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);
|
||||
|
||||
// Bookmarks Menu
|
||||
bookmarkMenu = menuBar->addMenu(tr("Bookmarks"));
|
||||
|
||||
populateBookmarkMenu();
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// Menu End
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -451,6 +456,22 @@ HexEditorDialog_t::~HexEditorDialog_t(void)
|
|||
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)
|
||||
{
|
||||
//printf("Close Window\n");
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <QCheckBox>
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
#include <QMenu>
|
||||
#include <QFrame>
|
||||
#include <QGroupBox>
|
||||
#include <QPlainTextEdit>
|
||||
|
@ -131,11 +132,13 @@ class HexEditorDialog_t : public QDialog
|
|||
void showMemViewResults (bool reset);
|
||||
int checkMemActivity(void);
|
||||
int calcVisibleRange( int *start_out, int *end_out, int *center_out );
|
||||
void populateBookmarkMenu(void);
|
||||
|
||||
QScrollBar *vbar;
|
||||
QScrollBar *hbar;
|
||||
QHexEdit *editor;
|
||||
QTimer *periodicTimer;
|
||||
QMenu *bookmarkMenu;
|
||||
|
||||
int mode;
|
||||
//int memSize;
|
||||
|
|
Loading…
Reference in New Issue