summaryrefslogtreecommitdiffstats
path: root/kbiff/kbiff.h
diff options
context:
space:
mode:
Diffstat (limited to 'kbiff/kbiff.h')
-rw-r--r--kbiff/kbiff.h140
1 files changed, 140 insertions, 0 deletions
diff --git a/kbiff/kbiff.h b/kbiff/kbiff.h
new file mode 100644
index 0000000..b76fad6
--- /dev/null
+++ b/kbiff/kbiff.h
@@ -0,0 +1,140 @@
+/*
+ * kbiff.h
+ * Copyright (C) 1999-2004 Kurt Granroth <granroth@kde.org>
+ *
+ * This file contains the declaration of the main KBiff
+ * widget.
+ *
+ * $Id$
+ */
+#ifndef KBIFF_H
+#define KBIFF_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <qlist.h>
+
+#include <kbiffmonitor.h>
+#include <setupdlg.h>
+
+#include <kbiffurl.h>
+#include <kapp.h>
+
+#include <qlabel.h>
+#include <qtimer.h>
+
+#include <notify.h>
+#include <status.h>
+
+#include <dcopclient.h>
+#include <dcopobject.h>
+
+class Led;
+
+class KBiff : public QLabel, virtual public DCOPObjectProxy
+{
+ Q_OBJECT
+public:
+ KBiff(DCOPClient *client_, QWidget *parent_ = 0);
+ virtual ~KBiff();
+
+ bool isDocked() const;
+
+ void processSetup(const KBiffSetup* setup, bool start);
+ void readSessionConfig();
+
+ void setMailboxList(const QList<KBiffMailbox>& mailbox_list, unsigned int poll = 60);
+
+ virtual bool process(const QCString& obj, const QCString& function,
+ const QByteArray& data, QCString& replyType,
+ QByteArray &replyData );
+
+public slots:
+ void slotPlaySound(const QString&);
+ void slotLaunchFetchClient(const QString&);
+ void slotLaunchMailClient();
+
+protected:
+ void mousePressEvent(QMouseEvent *);
+ void enterEvent(QEvent *);
+ void leaveEvent(QEvent *);
+
+protected:
+ void popupMenu();
+ void reset();
+ bool isRunning();
+ bool isGIF8x(const QString & file);
+ void executeCommand(const QString& command);
+ void registerMe(DCOPClient *client);
+
+protected slots:
+ void saveYourself();
+ void invokeHelp();
+ void displayPixmap();
+ void haveNewMail(const int, const QString &);
+ void haveNoNewMail();
+ void currentStatus(const int, const QString &, const KBiffMailState);
+ void dock();
+ void setup();
+ void checkMailNow();
+ void readMailNow();
+ void readPop3MailNow();
+ void stop();
+ void start();
+ void popupStatus();
+ void invalidLogin(const QString& mailbox);
+
+private:
+ bool findMailbox(const QString& url, QString& proxy);
+ int newMailCount(const QString& url);
+
+ QString getURLWithNewMail();
+ QString getMailBoxWithNewMail();
+ QString replaceCommandArgs(QString cmdStr);
+
+protected:
+ bool myMUTEX;
+ QList<KBiffMonitor> monitorList;
+ QList<KBiffNotify> notifyList;
+ KBiffStatusList statusList;
+ QStringList proxyList;
+
+ // Capability
+ QTimer *statusTimer;
+
+ // General settings
+ QString profile;
+ QString mailClient;
+
+ // New mail
+ bool systemBeep;
+ bool runCommand;
+ QString runCommandPath;
+ bool runResetCommand;
+ QString runResetCommandPath;
+ bool playSound;
+ QString playSoundPath;
+ bool notify;
+ bool dostatus;
+
+ bool docked;
+ bool sessions;
+ bool skipcheck;
+
+ bool isSecure;
+
+ QString noMailIcon;
+ QString newMailIcon;
+ QString oldMailIcon;
+ QString noConnIcon;
+ QString stoppedIcon;
+
+ KBiffStatus *status;
+ bool statusChanged;
+
+ Led *mled;
+};
+
+#endif // KBIFF_H