kpilot/summarywidget.h
1/*
2 This file is part of Kontact.
3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4 Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
20 As a special exception, permission is given to link this program
21 with any edition of TQt, and distribute the resulting executable,
22 without including the source code for TQt in the source distribution.
23*/
24
25#ifndef SUMMARYWIDGET_H
26#define SUMMARYWIDGET_H
27
28#include "summary.h"
29
30#include <dcopobject.h>
31#include <pilotDaemonDCOP.h>
32
33#include <tqmap.h>
34#include <tqpixmap.h>
35#include <tqptrlist.h>
36#include <tqstringlist.h>
37#include <tqtimer.h>
38#include <tqwidget.h>
39#include <tqdatetime.h>
40
41class TQGridLayout;
42class TQLabel;
43class KURLLabel;
44
45class SummaryWidget : public Kontact::Summary, public DCOPObject
46{
47 TQ_OBJECT
48
49 K_DCOP
50
51 public:
52 SummaryWidget( TQWidget *parent, const char *name = 0 );
53 virtual ~SummaryWidget();
54
55 int summaryHeight() const { return 1; }
56
57 TQStringList configModules() const;
58
59 k_dcop:
60 // all the information is pushed to Kontact by the daemon, to remove the chance of Kontact calling a daemon
61 // that is blocked for some reason, and blocking itself.
62 void receiveDaemonStatusDetails( TQDateTime, TQString, TQStringList, TQString, TQString, TQString, bool );
63 private slots:
64 void updateView();
65 void showSyncLog( const TQString &filename );
66 void startKPilot();
67 void slotAppRemoved( const TQCString & );
68 private:
69 TQTimer mTimer;
70
71 TQLabel*mSyncTimeTextLabel;
72 TQLabel*mSyncTimeLabel;
73 KURLLabel*mShowSyncLogLabel;
74 TQLabel*mPilotUserTextLabel;
75 TQLabel*mPilotUserLabel;
76 TQLabel*mPilotDeviceTextLabel;
77 TQLabel*mPilotDeviceLabel;
78 TQLabel*mDaemonStatusTextLabel;
79 TQLabel*mDaemonStatusLabel;
80 TQLabel*mConduitsTextLabel;
81 TQLabel*mConduitsLabel;
82 TQLabel*mNoConnectionLabel;
83 KURLLabel*mNoConnectionStartLabel;
84
85 TQGridLayout *mLayout;
86
87 TQDateTime mLastSyncTime;
88 TQString mDaemonStatus;
89 TQStringList mConduits;
90 TQString mSyncLog;
91 TQString mUserName;
92 TQString mPilotDevice;
93 bool mDCOPSuccess;
94
95 bool mStartedDaemon; // Record whether the daemon was started by kontact
96 bool mShouldStopDaemon;
97};
98
99#endif
100
Summary widget for display in the Summary View plugin.
Definition: summary.h:37
virtual TQStringList configModules() const
Return list of strings identifying configuration modules for this summary part.
Definition: summary.h:64
virtual int summaryHeight() const
Return logical height of summary widget.
Definition: summary.h:51