diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-10-13 12:54:56 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-10-13 12:54:56 +0000 |
| commit | 57ead40b4e5d6f70e93e4f4762a64aa9b50f2c6b (patch) | |
| tree | f3f55f4f98baa9592363ea2f04ac7b48e4306f71 /pica-client/picaactioncenter.cpp | |
| parent | 6235d0d99e59cc901019fa22201316e0c8a682c3 (diff) | |
| download | pica-pica-57ead40b4e5d6f70e93e4f4762a64aa9b50f2c6b.tar.gz pica-pica-57ead40b4e5d6f70e93e4f4762a64aa9b50f2c6b.zip | |
"show my ID" menuitem
git-svn-id: svn://localhost/project_picapica/trunk@280 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client/picaactioncenter.cpp')
| -rw-r--r-- | pica-client/picaactioncenter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pica-client/picaactioncenter.cpp b/pica-client/picaactioncenter.cpp index 10f71f3..a447b44 100644 --- a/pica-client/picaactioncenter.cpp +++ b/pica-client/picaactioncenter.cpp @@ -4,6 +4,7 @@ #include "skynet.h" #include <QApplication> #include "../PICA_proto.h" +#include "accounts.h" #include <QMessageBox> @@ -17,6 +18,9 @@ PicaActionCenter::PicaActionCenter(QObject *parent) : aboutAct = new QAction(tr("A&bout"),this); aboutAct->setStatusTip(tr("About Pica Pica Messenger")); connect(aboutAct,SIGNAL(triggered()),this,SLOT(about())); + + showmyidAct = new QAction(tr("Show My Pica Pica ID"), this); + connect(showmyidAct, SIGNAL(triggered()), this, SLOT(showmyid())); } void PicaActionCenter::about() @@ -43,3 +47,13 @@ void PicaActionCenter::exit() skynet->Exit(); QApplication::instance()->quit(); } + +void PicaActionCenter::showmyid() +{ + QMessageBox mbx; + mbx.setTextFormat(Qt::RichText); + mbx.setText(tr("Account: <b>%1</b><br>Pica Pica ID: <b>%2</b>") + .arg(Accounts::GetCurrentAccount().name) + .arg(Accounts::GetCurrentAccount().id.toBase64().constData())); + mbx.exec(); +} |
