kontact

summarywidget.h

00001 /*
00002     This file is part of Kontact.
00003     Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
00004     Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 
00025 #ifndef SUMMARYWIDGET_H
00026 #define SUMMARYWIDGET_H
00027 
00028 #include "summary.h"
00029 
00030 #include <dcopobject.h>
00031 #include <pilotDaemonDCOP.h>
00032 
00033 #include <qmap.h>
00034 #include <qpixmap.h>
00035 #include <qptrlist.h>
00036 #include <qstringlist.h>
00037 #include <qtimer.h>
00038 #include <qwidget.h>
00039 #include <qdatetime.h>
00040 
00041 class QGridLayout;
00042 class QLabel;
00043 class KURLLabel;
00044 
00045 class SummaryWidget : public Kontact::Summary, public DCOPObject
00046 {
00047   Q_OBJECT
00048   K_DCOP
00049 
00050   public:
00051     SummaryWidget( QWidget *parent, const char *name = 0 );
00052     virtual ~SummaryWidget();
00053 
00054     int summaryHeight() const { return 1; }
00055 
00056     QStringList configModules() const;
00057 
00058   k_dcop:
00059     // all the information is pushed to Kontact by the daemon, to remove the chance of Kontact calling a daemon
00060     // that is blocked for some reason, and blocking itself.
00061     void receiveDaemonStatusDetails( QDateTime, QString, QStringList, QString, QString, QString, bool );
00062   private slots:
00063     void updateView();
00064     void showSyncLog( const QString &filename );
00065     void startKPilot();
00066     void slotAppRemoved( const QCString & );
00067   private:
00068     QTimer mTimer;
00069 
00070     QLabel*mSyncTimeTextLabel;
00071     QLabel*mSyncTimeLabel;
00072     KURLLabel*mShowSyncLogLabel;
00073     QLabel*mPilotUserTextLabel;
00074     QLabel*mPilotUserLabel;
00075     QLabel*mPilotDeviceTextLabel;
00076     QLabel*mPilotDeviceLabel;
00077     QLabel*mDaemonStatusTextLabel;
00078     QLabel*mDaemonStatusLabel;
00079     QLabel*mConduitsTextLabel;
00080     QLabel*mConduitsLabel;
00081     QLabel*mNoConnectionLabel;
00082     KURLLabel*mNoConnectionStartLabel;
00083 
00084     QGridLayout *mLayout;
00085 
00086     QDateTime mLastSyncTime;
00087     QString mDaemonStatus;
00088     QStringList mConduits;
00089     QString mSyncLog;
00090     QString mUserName;
00091     QString mPilotDevice;
00092     bool mDCOPSuccess;
00093 
00094     bool mStartedDaemon; // Record whether the daemon was started by kontact
00095     bool mShouldStopDaemon;
00096 };
00097 
00098 #endif
00099 
KDE Home | KDE Accessibility Home | Description of Access Keys