Setting up framework for hex editor bookmarks
This commit is contained in:
parent
ff3125cbf8
commit
832a6b0a64
|
@ -403,6 +403,11 @@ HexEditorDialog_t::HexEditorDialog_t(QWidget *parent)
|
||||||
|
|
||||||
colorMenu->addAction(actColorBG);
|
colorMenu->addAction(actColorBG);
|
||||||
|
|
||||||
|
// Bookmarks Menu
|
||||||
|
bookmarkMenu = menuBar->addMenu(tr("Bookmarks"));
|
||||||
|
|
||||||
|
populateBookmarkMenu();
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
// Menu End
|
// Menu End
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
|
@ -451,6 +456,22 @@ HexEditorDialog_t::~HexEditorDialog_t(void)
|
||||||
periodicTimer->stop();
|
periodicTimer->stop();
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
void HexEditorDialog_t::populateBookmarkMenu(void)
|
||||||
|
{
|
||||||
|
QAction *act;
|
||||||
|
|
||||||
|
bookmarkMenu->clear();
|
||||||
|
|
||||||
|
// Bookmarks -> Remove All Bookmarks
|
||||||
|
act = new QAction(tr("Remove All Bookmarks"), this);
|
||||||
|
//act->setShortcuts(QKeySequence::Open);
|
||||||
|
act->setStatusTip(tr("Remove All Bookmarks"));
|
||||||
|
//connect(act, SIGNAL(triggered(void)), this, SLOT(pickBackGroundColor(void)) );
|
||||||
|
|
||||||
|
bookmarkMenu->addAction(act);
|
||||||
|
bookmarkMenu->addSeparator();
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
void HexEditorDialog_t::closeWindow(void)
|
void HexEditorDialog_t::closeWindow(void)
|
||||||
{
|
{
|
||||||
//printf("Close Window\n");
|
//printf("Close Window\n");
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
#include <QMenu>
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
|
@ -131,11 +132,13 @@ class HexEditorDialog_t : public QDialog
|
||||||
void showMemViewResults (bool reset);
|
void showMemViewResults (bool reset);
|
||||||
int checkMemActivity(void);
|
int checkMemActivity(void);
|
||||||
int calcVisibleRange( int *start_out, int *end_out, int *center_out );
|
int calcVisibleRange( int *start_out, int *end_out, int *center_out );
|
||||||
|
void populateBookmarkMenu(void);
|
||||||
|
|
||||||
QScrollBar *vbar;
|
QScrollBar *vbar;
|
||||||
QScrollBar *hbar;
|
QScrollBar *hbar;
|
||||||
QHexEdit *editor;
|
QHexEdit *editor;
|
||||||
QTimer *periodicTimer;
|
QTimer *periodicTimer;
|
||||||
|
QMenu *bookmarkMenu;
|
||||||
|
|
||||||
int mode;
|
int mode;
|
||||||
//int memSize;
|
//int memSize;
|
||||||
|
|
Loading…
Reference in New Issue