diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-02-23 19:23:31 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-02-23 19:23:31 +0000 |
| commit | 04eae518a62cac9db008d3abcdfb6a8d23b949ad (patch) | |
| tree | c43e0f4c8052a51e789ead43ffd08c6368fce2c2 | |
| parent | 85481b5b8c7479eda06b632dcf4a6004b2ee4c44 (diff) | |
| download | pica-pica-04eae518a62cac9db008d3abcdfb6a8d23b949ad.tar.gz pica-pica-04eae518a62cac9db008d3abcdfb6a8d23b949ad.zip | |
reverting rev213
git-svn-id: svn://localhost/project_picapica/trunk@228 fb96df88-216d-11de-830c-f3023f12d8ac
| -rw-r--r-- | pica-client/picaactioncenter.cpp | 38 | ||||
| -rw-r--r-- | pica-client/picaactioncenter.h | 3 |
2 files changed, 2 insertions, 39 deletions
diff --git a/pica-client/picaactioncenter.cpp b/pica-client/picaactioncenter.cpp index 8d36a4b..8bedb0f 100644 --- a/pica-client/picaactioncenter.cpp +++ b/pica-client/picaactioncenter.cpp @@ -3,11 +3,8 @@ #include "mainwindow.h" #include "skynet.h" #include <QApplication> + #include <QMessageBox> -#include <QPalette> -#include <QDesktopServices> -#include <QEvent> -#include <QMouseEvent> PicaActionCenter::PicaActionCenter(QObject *parent) : QObject(parent) @@ -19,20 +16,6 @@ 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())); - link = new QLabel; - link->installEventFilter(this); -} - -bool PicaActionCenter::eventFilter(QObject *obj, QEvent *ev) -{ - QMouseEvent *mEvent = (QMouseEvent*)ev; - - if (obj == link && mEvent->button() == Qt::LeftButton && - ev->type() == QEvent::MouseButtonRelease) { - QDesktopServices::openUrl(QUrl(link->text())); - } - - ev->accept(); } void PicaActionCenter::about() @@ -42,27 +25,10 @@ void PicaActionCenter::about() #else #define VERSION_STRING "" #endif - QMessageBox mbx; mbx.setWindowIcon(picapica_ico_sit); mbx.setIconPixmap(picapica_ico_sit.pixmap(32)); - QString author = "Pica Pica Messenger "VERSION_STRING"\n" - "(c) 2012 Anton Sviridenko"; - - link->setParent(&mbx); - link->setText("http://picapica.im"); - int x = author.count("\n") + 1; - float f = mbx.font().pointSize(); - link->move(60, f * 2 * x); - link->resize(150, 30); - link->setForegroundRole(QPalette::Link); - QCursor cursor; - cursor.setShape(Qt::PointingHandCursor); - link->setCursor(cursor); - - QString contrib = "\n\n\nContributors:\nDaniil Ustinov - bugfixes"; - mbx.setText(tr(QString(author + contrib).toStdString().c_str())); - + mbx.setText(tr("Pica Pica Messenger "VERSION_STRING"\n(c) 2012 Anton Sviridenko\n http://picapica.im\n\n\Contributors:\nDaniil Ustinov - bugfixes")); mbx.exec(); } diff --git a/pica-client/picaactioncenter.h b/pica-client/picaactioncenter.h index c768afa..a406743 100644 --- a/pica-client/picaactioncenter.h +++ b/pica-client/picaactioncenter.h @@ -3,7 +3,6 @@ #include <QObject> #include <QAction> -#include <QLabel> class PicaActionCenter : public QObject { @@ -17,8 +16,6 @@ public: private: QAction *aboutAct; QAction *exitAct; - QLabel *link; - bool eventFilter(QObject *obj, QEvent *ev); signals: |
