diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2012-06-17 21:15:12 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2012-06-17 21:15:12 +0000 |
| commit | 8df9466ada46e4b07990b9cb7e8b1cd61b96844a (patch) | |
| tree | 2cb652e5839bed672133ffa90e7ad477f55cfb6b /pica-client/picaactioncenter.cpp | |
| download | pica-pica-8df9466ada46e4b07990b9cb7e8b1cd61b96844a.tar.gz pica-pica-8df9466ada46e4b07990b9cb7e8b1cd61b96844a.zip | |
todo list update
git-svn-id: svn://localhost/project_picapica/trunk@128 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client/picaactioncenter.cpp')
| -rw-r--r-- | pica-client/picaactioncenter.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pica-client/picaactioncenter.cpp b/pica-client/picaactioncenter.cpp new file mode 100644 index 0000000..9a811dc --- /dev/null +++ b/pica-client/picaactioncenter.cpp @@ -0,0 +1,37 @@ +#include "picaactioncenter.h" +#include "globals.h" +#include "mainwindow.h" +#include "skynet.h" +#include <QApplication> + +#include <QMessageBox> + +PicaActionCenter::PicaActionCenter(QObject *parent) : + QObject(parent) +{ + exitAct = new QAction(tr("E&xit"),this); + exitAct->setStatusTip(tr("Close Pica Pica messenger and exit")); + connect(exitAct,SIGNAL(triggered()),this,SLOT(exit())); + + aboutAct = new QAction(tr("A&bout"),this); + aboutAct->setStatusTip(tr("About Pica Pica Messenger")); + connect(aboutAct,SIGNAL(triggered()),this,SLOT(about())); +} + +void PicaActionCenter::about() +{ + QMessageBox mbx; + mbx.setWindowIcon(picapica_ico_sit); + mbx.setIconPixmap(picapica_ico_sit.pixmap(32)); + mbx.setText(tr("(c) 2012 Anton Sviridenko")); + mbx.exec(); +} + +void PicaActionCenter::exit() +{ + if (mainwindow) + mainwindow->close(); + + skynet->Exit(); + QApplication::instance()->quit(); +} |
