kpilot Library API Documentation

uiDialog.h

00001 #ifndef _KPILOT_UIDIALOG_H
00002 #define _KPILOT_UIDIALOG_H
00003 /* uiDialog.h                           KPilot
00004 **
00005 ** Copyright (C) 2001 by Dan Pilone
00006 **
00007 ** This defines a subclass of KDialogBase that handles the setup for
00008 ** KPilot -- and conduits -- configuration dialogs. It also provides
00009 ** some support for the default about-page in setup dialogs, for applications
00010 ** (like conduits) with no main window or menu.
00011 */
00012  
00013 /*
00014 ** This program is free software; you can redistribute it and/or modify
00015 ** it under the terms of the GNU Lesser General Public License as published by
00016 ** the Free Software Foundation; either version 2.1 of the License, or
00017 ** (at your option) any later version.
00018 **
00019 ** This program is distributed in the hope that it will be useful,
00020 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00021 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00022 ** GNU Lesser General Public License for more details.
00023 **
00024 ** You should have received a copy of the GNU Lesser General Public License
00025 ** along with this program in a file called COPYING; if not, write to
00026 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00027 ** MA 02111-1307, USA.
00028 */
00029  
00030 /*
00031 ** Bug reports and questions can be sent to kde-pim@kde.org
00032 */
00033 
00034 #include <kdialogbase.h>
00035 
00036 class QTabWidget;
00037 class QPushButton;
00038 class KAboutData;
00039 
00040 class UIDialog : public KDialogBase
00041 {
00042 Q_OBJECT
00043 public:
00051     UIDialog(QWidget *parent=0L, const char *name=0L, bool modal=false);
00052     UIDialog(QWidget *parent=0L, const char *name=0L,
00053         int buttonmask=Ok|Cancel, bool modal=false);
00054     virtual ~UIDialog();
00055 
00056 protected:
00063     void addAboutPage(bool aboutbutton=false,KAboutData *data=0L);
00064 
00065 public:
00071     static QPushButton *addAboutPage(QTabWidget *,
00072         KAboutData *data=0L,
00073         bool aboutbutton=false);
00074 
00075 protected slots:
00076     void showAbout();
00077     virtual void slotOk();
00078 
00079 protected:
00085     virtual bool validate() { return true; } ;
00086     virtual void commitChanges() = 0;
00087 
00088     QWidget *widget() const { return fMainWidget; } ;
00089     QTabWidget *tabWidget() const { return fP; } ;
00090     void setTabWidget(QTabWidget *w);
00091 
00092 private:
00093     QWidget *fMainWidget;
00094     QTabWidget *fP;
00095 } ;
00096 
00097 #endif
KDE Logo
This file is part of the documentation for kpilot Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:36:50 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003