kpilot

pilotComponent.h

Go to the documentation of this file.
00001 #ifndef _KPILOT_PILOTCOMPONENT_H
00002 #define _KPILOT_PILOTCOMPONENT_H
00003 /* pilotComponent.h         KPilot
00004 **
00005 ** Copyright (C) 1998-2001 by Dan Pilone
00006 ** Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00007 **
00008 ** See the .cc file for an explanation of what this file is for.
00009 */
00010 
00011 /*
00012 ** This program is free software; you can redistribute it and/or modify
00013 ** it under the terms of the GNU General Public License as published by
00014 ** the Free Software Foundation; either version 2 of the License, or
00015 ** (at your option) any later version.
00016 **
00017 ** This program is distributed in the hope that it will be useful,
00018 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 ** GNU General Public License for more details.
00021 **
00022 ** You should have received a copy of the GNU General Public License
00023 ** along with this program in a file called COPYING; if not, write to
00024 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00025 ** MA 02110-1301, USA.
00026 */
00027 
00028 /*
00029 ** Bug reports and questions can be sent to kde-pim@kde.org
00030 */
00031 
00035 #include <qwidget.h>
00036 
00037 struct CategoryAppInfo;
00038 class QComboBox;
00039 class QString;
00040 
00041 class PilotComponent : public QWidget
00042 {
00043 Q_OBJECT
00044 friend class KPilotInstaller;
00045 
00046 public:
00047     PilotComponent(QWidget* parent,
00048         const char *id,
00049         const QString& dbPath);
00050 
00055     virtual void showComponent() {}
00063     virtual void hideComponent() {}
00064 
00069     void showKPilotComponent( bool toShow );
00070 
00071 
00086     virtual bool preHotSync(QString &s) ;
00087 
00091     virtual void postHotSync() { } ;
00092 
00093 
00094 protected:
00108     int findSelectedCategory(QComboBox *,
00109         CategoryAppInfo *,
00110         bool AllIsUnfiled=false);
00111 
00122     void populateCategories(QComboBox *,
00123         CategoryAppInfo *info=0);
00124 
00125     void setDBPath(const QString &path) { fDBPath = path; } ;
00126     const QString& dbPath() const { return fDBPath; } ;
00127     void markDBDirty(const QString db);
00128 
00129 public slots:
00130     void slotShowComponent();
00131 
00132 signals:
00133     void showComponent(PilotComponent *);
00134 
00135 private:
00136     QString fDBPath;
00137 protected:
00138     bool shown;
00139 } ;
00140 
00141 #endif