small fix with menus

This commit is contained in:
Volker Fischer 2009-11-27 20:27:42 +00:00
parent 3d10c518c8
commit 90d4382aab
2 changed files with 893 additions and 890 deletions

View file

@ -248,23 +248,26 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
} }
// Settings menu ---------------------------------------------------------- // View menu --------------------------------------------------------------
pSettingsMenu = new QMenu ( "&View", this ); pViewMenu = new QMenu ( "&View", this );
pSettingsMenu->setAccessibleName ( "View menu" ); pViewMenu->setAccessibleName ( "View menu" );
QAction* test = pSettingsMenu->addAction ( tr ( "&Chat..." ), this,
pViewMenu->addAction ( tr ( "&Chat..." ), this,
SLOT ( OnOpenChatDialog() ) ); SLOT ( OnOpenChatDialog() ) );
pSettingsMenu->addAction ( tr ( "&General Settings..." ), this,
pViewMenu->addAction ( tr ( "&General Settings..." ), this,
SLOT ( OnOpenGeneralSettings() ) ); SLOT ( OnOpenGeneralSettings() ) );
pSettingsMenu->addSeparator(); pViewMenu->addSeparator();
pSettingsMenu->addAction ( tr ( "E&xit" ), this,
pViewMenu->addAction ( tr ( "E&xit" ), this,
SLOT ( close() ), QKeySequence ( Qt::CTRL + Qt::Key_Q ) ); SLOT ( close() ), QKeySequence ( Qt::CTRL + Qt::Key_Q ) );
// Main menu bar ----------------------------------------------------------- // Main menu bar -----------------------------------------------------------
pMenu = new QMenuBar ( this ); pMenu = new QMenuBar ( this );
pMenu->setAccessibleName ( "Main menu" ); pMenu->setAccessibleName ( "Main menu" );
pMenu->addMenu ( pSettingsMenu ); pMenu->addMenu ( pViewMenu );
pMenu->addMenu ( new CLlconHelpMenu ( this ) ); pMenu->addMenu ( new CLlconHelpMenu ( this ) );
// Now tell the layout about the menu // Now tell the layout about the menu

View file

@ -87,7 +87,7 @@ protected:
virtual void closeEvent ( QCloseEvent* Event ); virtual void closeEvent ( QCloseEvent* Event );
void UpdateDisplay(); void UpdateDisplay();
QMenu* pSettingsMenu; QMenu* pViewMenu;
QMenuBar* pMenu; QMenuBar* pMenu;
CClientSettingsDlg ClientSettingsDlg; CClientSettingsDlg ClientSettingsDlg;