diff options
author | Michal Kubecek <mkubecek@suse.cz> | 2015-04-14 12:50:55 +0200 |
---|---|---|
committer | Michal Kubecek <mkubecek@suse.cz> | 2015-04-15 10:53:25 +0200 |
commit | 9d3babea67fb5463e5b5bbd69a31131516476b96 (patch) | |
tree | 6725ffa4aa08d6a4df6af26068c113f00be46975 /src/gui/freedesksystray.cpp | |
parent | 10478170cb97e558899dcbdd3a6fef6a0e79a124 (diff) | |
download | twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar.gz twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar.lz twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar.xz twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.zip |
Qt4 port step 2: apply qt3toqt4
Diffstat (limited to 'src/gui/freedesksystray.cpp')
-rw-r--r-- | src/gui/freedesksystray.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/freedesksystray.cpp b/src/gui/freedesksystray.cpp index caab5c6..4dfddd4 100644 --- a/src/gui/freedesksystray.cpp +++ b/src/gui/freedesksystray.cpp @@ -21,12 +21,17 @@ // 2006 Modified by Michel de Boer #include "freedesksystray.h" +//Added by qt3to4: +#include <QPixmap> +#include <QLabel> +#include <QMouseEvent> +#include <Q3PopupMenu> FreeDeskSysTray::FreeDeskSysTray ( QWidget *pParent , const char *pszName ) : QLabel(pParent, pszName, WMouseNoMask | WRepaintNoErase | WType_TopLevel | WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop) { mainWindow = pParent; - trayMenu = new QPopupMenu(this); + trayMenu = new Q3PopupMenu(this); } void FreeDeskSysTray::dock () @@ -34,7 +39,7 @@ void FreeDeskSysTray::dock () trayMenu->insertSeparator(); trayMenu->insertItem(tr("Show/Hide"), this, SLOT(slotMenuItemShow())) ; - QIconSet quitIcon(QPixmap::fromMimeSource("exit.png")); + QIcon quitIcon(QPixmap::fromMimeSource("exit.png")); trayMenu->insertItem(quitIcon, tr("Quit"), this, SLOT(slotMenuItemQuit())) ; Display *dpy = QPaintDevice::x11AppDisplay(); @@ -97,11 +102,11 @@ void FreeDeskSysTray::mousePressEvent ( QMouseEvent *pMouseEvent ) switch (pMouseEvent->button()) { - case LeftButton: + case Qt::LeftButton: slotMenuItemShow(); break; - case RightButton: + case Qt::RightButton: showContextMenu(pMouseEvent->globalPos()); break; @@ -129,7 +134,7 @@ void FreeDeskSysTray::setPixmapOverlay ( const QPixmap& pmOverlay ) QLabel::setPixmap(pm); } -QPopupMenu *FreeDeskSysTray::contextMenu() +Q3PopupMenu *FreeDeskSysTray::contextMenu() { return trayMenu; } |