diff options
Diffstat (limited to 'pica-client')
| -rw-r--r-- | pica-client/mainwindow.cpp | 3 | ||||
| -rw-r--r-- | pica-client/mainwindow.h | 1 | ||||
| -rw-r--r-- | pica-client/picaactioncenter.cpp | 10 | ||||
| -rw-r--r-- | pica-client/picaactioncenter.h | 3 |
4 files changed, 17 insertions, 0 deletions
diff --git a/pica-client/mainwindow.cpp b/pica-client/mainwindow.cpp index 2081dbc..8f4702f 100644 --- a/pica-client/mainwindow.cpp +++ b/pica-client/mainwindow.cpp @@ -111,6 +111,9 @@ void MainWindow::createMenus() nodesMenu=menuBar()->addMenu(tr("&Nodes")); + settingsMenu = menuBar()->addMenu(tr("&Settings")); + settingsMenu->addAction(action_center->SettingsAct()); + helpMenu=menuBar()->addMenu(tr("&Help")); helpMenu->addAction(action_center->AboutAct()); diff --git a/pica-client/mainwindow.h b/pica-client/mainwindow.h index 4f5ee0d..b61f31a 100644 --- a/pica-client/mainwindow.h +++ b/pica-client/mainwindow.h @@ -39,6 +39,7 @@ private: QMenu *helpMenu; QMenu *nodesMenu; QMenu *accountMenu; + QMenu *settingsMenu; bool status_change_disable_flag; void SetStatus(bool connected); diff --git a/pica-client/picaactioncenter.cpp b/pica-client/picaactioncenter.cpp index 7fe5400..1aa09ec 100644 --- a/pica-client/picaactioncenter.cpp +++ b/pica-client/picaactioncenter.cpp @@ -7,6 +7,7 @@ #include "accounts.h" #include "dialogs/showpicaiddialog.h" #include "sound.h" +#include "dialogs/settingsdialog.h" #include <QMessageBox> @@ -27,6 +28,9 @@ PicaActionCenter::PicaActionCenter(QObject *parent) : muteSoundsAct = new QAction(tr("&Mute Sounds"), this); muteSoundsAct->setCheckable(true); connect(muteSoundsAct, SIGNAL(triggered(bool)), this, SLOT(muteSounds(bool))); + + settingsAct = new QAction(tr("&Configure Messenger..."), this); + connect(settingsAct, SIGNAL(triggered(bool)), this, SLOT(showsettings())); } void PicaActionCenter::about() @@ -55,6 +59,12 @@ void PicaActionCenter::exit() QApplication::instance()->quit(); } +void PicaActionCenter::showsettings() +{ + SettingsDialog sd; + sd.exec(); +} + void PicaActionCenter::showmyid() { ShowPicaIdDialog d(Accounts::GetCurrentAccount().name, Accounts::GetCurrentAccount().id, tr("My Current Account")); diff --git a/pica-client/picaactioncenter.h b/pica-client/picaactioncenter.h index 6361d01..7fa98c4 100644 --- a/pica-client/picaactioncenter.h +++ b/pica-client/picaactioncenter.h @@ -14,12 +14,14 @@ public: QAction *ExitAct() {return exitAct;}; QAction *ShowMyIDAct() {return showmyidAct;}; QAction *MuteSoundsAct() {return muteSoundsAct;}; + QAction *SettingsAct() {return settingsAct; }; private: QAction *aboutAct; QAction *exitAct; QAction *showmyidAct; QAction *muteSoundsAct; + QAction *settingsAct; signals: @@ -29,6 +31,7 @@ private slots: void exit(); void showmyid(); void muteSounds(bool yes); + void showsettings(); }; #endif // PICAACTIONCENTER_H |
