aboutsummaryrefslogtreecommitdiffstats
path: root/kde2/klipsi/toplevel.cpp
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2002-07-07 13:45:59 +0000
committerFritz Elfert <felfert@to.com>2002-07-07 13:45:59 +0000
commit1d8ec8558e45eb667a490781a978e7b6b73c6b01 (patch)
treed7600339be0654051ee5c6c8543c42402ae38345 /kde2/klipsi/toplevel.cpp
parentfcace9c7bfc47ad73839ead8f42050ffc972cd1d (diff)
downloadplptools-1d8ec8558e45eb667a490781a978e7b6b73c6b01.tar.gz
plptools-1d8ec8558e45eb667a490781a978e7b6b73c6b01.tar.bz2
plptools-1d8ec8558e45eb667a490781a978e7b6b73c6b01.zip
- Adaptions to KDE3 and QT3
- Added About dialog
Diffstat (limited to 'kde2/klipsi/toplevel.cpp')
-rw-r--r--kde2/klipsi/toplevel.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/kde2/klipsi/toplevel.cpp b/kde2/klipsi/toplevel.cpp
index 1de43b7..6f92e5a 100644
--- a/kde2/klipsi/toplevel.cpp
+++ b/kde2/klipsi/toplevel.cpp
@@ -26,6 +26,8 @@
#include <qmenudata.h>
#include <qpainter.h>
#include <qtimer.h>
+#include <qimage.h>
+#include <qcursor.h>
#include <kaction.h>
#include <kapp.h>
@@ -39,6 +41,7 @@
#include <psibitmap.h>
#define QUIT_ITEM 50
+#define ABOUT_ITEM 51
#define CLIPFILE "C:/System/Data/Clpboard.cbd"
TopLevel::TopLevel()
@@ -47,6 +50,9 @@ TopLevel::TopLevel()
KNotifyClient::startDaemon();
clip = kapp->clipboard();
+#if QT_VERSION > 300
+ clip->setSelectionMode(true);
+#endif
menu = new KPopupMenu(0, "main_menu");
timer = new QTimer();
@@ -70,8 +76,10 @@ TopLevel::TopLevel()
menu->insertTitle(kapp->miniIcon(), i18n("Klipsi - Psion Clipboard"));
menu->insertSeparator();
+ menu->insertItem(SmallIcon("help"), i18n("&About Klipsi"), ABOUT_ITEM);
menu->insertItem(SmallIcon("exit"), i18n("&Quit"), QUIT_ITEM);
+ about = new KAboutApplication(0L, 0L, false);
connect(menu, SIGNAL(activated(int)), this, SLOT(slotMenuSelected(int)));
connect(clip, SIGNAL(dataChanged()), this, SLOT(slotClipboardChanged()));
connect(timer, SIGNAL(timeout()), this, SLOT(slotTimer()));
@@ -208,10 +216,11 @@ slotClipboardChanged()
if (!checkConnection())
return;
- QImage clipImage = clip->image();
+ QImage clipImage = 0L;
QString clipText = clip->text();
if (clipText.isEmpty()) {
+ clipImage = clip->image();
if (clipImage.isNull())
return;
inSend = true;
@@ -240,6 +249,9 @@ void TopLevel::
slotMenuSelected(int id)
{
switch (id) {
+ case ABOUT_ITEM:
+ about->show();
+ break;
case QUIT_ITEM:
kapp->quit();
break;