kpilot
conduitConfigDialog.h
Go to the documentation of this file.00001 #ifndef _KPILOT_CONDUITCONFIGDIALOG_H 00002 #define _KPILOT_CONDUITCONFIGDIALOG_H 00003 /* conduitConfigDialog.h KPilot 00004 ** 00005 ** Copyright (C) 2001 by Dan Pilone 00006 ** Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00007 ** 00008 ** This file defines a dialog that uses the .ui-defined widget for 00009 ** configuring conduits. 00010 */ 00011 00012 /* 00013 ** This program is free software; you can redistribute it and/or modify 00014 ** it under the terms of the GNU General Public License as published by 00015 ** the Free Software Foundation; either version 2 of the License, or 00016 ** (at your option) any later version. 00017 ** 00018 ** This program is distributed in the hope that it will be useful, 00019 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 ** GNU General Public License for more details. 00022 ** 00023 ** You should have received a copy of the GNU General Public License 00024 ** along with this program in a file called COPYING; if not, write to 00025 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00026 ** MA 02110-1301, USA. 00027 */ 00028 00029 /* 00030 ** Bug reports and questions can be sent to kde-pim@kde.org 00031 */ 00032 00033 // #include "conduitConfigDialog_base.h" 00034 #include "kcmodule.h" 00035 00036 class QListView; 00037 class QListViewItem; 00038 class QPushButton; 00039 class QLabel; 00040 class QWidgetStack; 00041 class KProcess; 00042 class ConduitConfigBase; 00043 class ConduitConfig; 00044 00045 class ConduitConfigWidgetBase : public KCModule 00046 { 00047 Q_OBJECT 00048 public: 00049 ConduitConfigWidgetBase(QWidget *p=0L,const char *n=0L); 00050 00051 QListView *fConduitList; 00052 QWidgetStack *fStack; 00053 QPushButton *fConfigureButton; 00054 QPushButton *fConfigureWizard,*fConfigureKontact; 00055 QLabel *fActionDescription; 00056 QLabel *fTitleText; // Dialog title above fStack 00057 } ; 00058 00059 class ConduitConfigWidget : public ConduitConfigWidgetBase 00060 { 00061 Q_OBJECT 00062 public: 00063 ConduitConfigWidget(QWidget *, 00064 const char *name=0L, bool ownButtons=false); 00065 virtual ~ConduitConfigWidget(); 00066 00067 protected: 00068 void fillLists(); 00069 00070 void warnNoExec(const QListViewItem *); 00071 void warnNoLibrary(const QListViewItem *); 00072 00073 void loadAndConfigure(QListViewItem *); // ,bool); 00074 00075 public: 00083 bool release(); 00084 bool validate() {return release(); } 00085 00086 public slots: 00087 virtual void save(); 00088 virtual void load(); 00089 // void slotOk(); 00090 // void slotApply(); 00091 00092 signals: 00093 void selectionChanged(QListViewItem *); 00094 void sizeChanged(); 00095 00096 protected slots: 00097 void configure(); 00098 void configureWizard(); 00099 00100 void unselect(); // Helper slot when cancelling a change in selection 00101 void selected(QListViewItem *); 00102 void conduitsChanged(QListViewItem*); 00103 void reopenItem(QListViewItem *); 00104 00105 private: 00106 QPushButton *fConfigure; 00107 QListViewItem *fCurrentConduit; 00108 QListViewItem *fGeneralPage; 00109 ConduitConfigBase *fCurrentConfig; 00110 }; 00111 00112 #endif