kpilot Library API Documentation

kpilot.h

00001 #ifndef _KPILOT_KPILOT_H
00002 #define _KPILOT_KPILOT_H
00003 /* kpilot.h                     KPilot
00004 **
00005 ** Copyright (C) 1998-2001 by Dan Pilone
00006 **
00007 ** This is the main program in KPilot.
00008 */
00009 
00010 /*
00011 ** This program is free software; you can redistribute it and/or modify
00012 ** it under the terms of the GNU General Public License as published by
00013 ** the Free Software Foundation; either version 2 of the License, or
00014 ** (at your option) any later version.
00015 **
00016 ** This program is distributed in the hope that it will be useful,
00017 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 ** GNU General Public License for more details.
00020 **
00021 ** You should have received a copy of the GNU General Public License
00022 ** along with this program in a file called COPYING; if not, write to
00023 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00024 ** MA 02111-1307, USA.
00025 */
00026 
00027 /*
00028 ** Bug reports and questions can be sent to kde-pim@kde.org
00029 */
00030 
00031 #include <kmainwindow.h>
00032 
00033 
00034 class QPopupMenu;
00035 class QComboBox;
00036 class KAction;
00037 class KToggleAction;
00038 class KProgress;
00039 class KJanusWidget;
00040 
00041 class PilotDaemonDCOP_stub;
00042 class PilotComponent;
00043 class FileInstallWidget;
00044 class LogWidget;
00045 
00046 
00047 #include "kpilotDCOP.h"
00048 
00049 
00050 
00051 class KPilotInstaller : public KMainWindow, public KPilotDCOP
00052 {
00053 Q_OBJECT
00054 
00055 public:
00056         KPilotInstaller();
00057         KPilotInstaller(QStrList& fileList);
00058         ~KPilotInstaller();
00059 
00066         static const char *version(int kind);
00067 
00068 
00069 
00070 
00071 
00072         // Adds 'name' to the pull down menu of components
00073         void addComponentPage(PilotComponent *, const QString &name);
00074 
00075 
00076         typedef enum { Normal,
00077                 Startup,
00078                 WaitingForDaemon,
00079                 UIBusy,
00080                 Error } Status ;
00081 
00082         Status status() const { return fStatus; } ;
00083 
00084 
00085 protected:
00086         void closeEvent(QCloseEvent *e);
00087         KJanusWidget *getManagingWidget() { return fManagingWidget; }
00088 
00093 protected:
00094         PilotDaemonDCOP_stub &getDaemon() { return *fDaemonStub; } ;
00095 private:
00096         PilotDaemonDCOP_stub *fDaemonStub;
00097 
00103 protected:
00104         void killDaemonIfNeeded();
00105 public:
00106         void startDaemonIfNeeded();
00107 
00108 public slots:
00109         void slotRestoreRequested();
00110         void slotBackupRequested();
00111         void slotHotSyncRequested();
00112         void slotListSyncRequested();
00113 
00114 
00119         void optionsShowToolbar();
00120         void optionsConfigureKeys();
00121         void optionsConfigureToolbars();
00122 
00123 
00124 public:
00128         virtual ASYNC daemonStatus(int);
00129 
00130 protected:
00131         void readConfig();
00132 
00133 
00137         bool componentPreSync();
00138         void setupSync(int kind,const QString& msg);
00139         void componentPostSync();
00140 
00141         void initIcons();
00142         void initMenu();
00143         void setupWidget();
00144         void initComponents();
00145 
00150         class KPilotPrivate;
00151         KPilotPrivate *fP;
00152 
00153 private:
00154         KMenuBar*       fMenuBar;
00155         KToolBar*       fToolBar;
00156         bool            fQuitAfterCopyComplete; // Used for GUI-less interface
00157         KJanusWidget    *fManagingWidget;
00158         bool            fKillDaemonOnExit;
00159         bool fDaemonWasRunning;
00160 
00161         Status fStatus;
00162 
00163         FileInstallWidget *fFileInstallWidget;
00164         LogWidget *fLogWidget;
00165 
00169         KToggleAction  *m_toolbarAction;
00170         KToggleAction  *m_statusbarAction;
00171 
00172 
00173 protected slots:
00174         void quit();
00175         void slotConfigureKPilot();
00176         void slotConfigureConduits();
00177         void fileInstalled(int which);
00178         void slotNewToolbarConfig();
00179 
00189         void slotSelectComponent(PilotComponent *);
00190 
00195         void initializeComponents();
00196         
00197 signals:
00198         void modeSelected(int selected);
00199 };
00200 
00201 
00202 
00203 
00204 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:43 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001