kpresenter

AFChoose.h

00001 // -*- Mode: c++-mode; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef AFCHOOSE_H
00022 #define AFCHOOSE_H
00023 
00024 #include <qtabdialog.h>
00025 #include <qptrlist.h>
00026 #include <qmap.h>
00027 #include <qfileinfo.h>
00028 
00029 class QLabel;
00030 class KIconCanvas;
00031 
00032 class AFChoose : public QTabDialog
00033 {
00034     Q_OBJECT
00035 
00036 public:
00037 
00038     // constructor - destructor
00039     AFChoose(QWidget *parent=0, const QString &caption=QString::null, const char *name=0);
00040     ~AFChoose();
00041 
00042 private:
00043 
00044     // structure of a group
00045     struct Group
00046     {
00047         QFileInfo dir;
00048         QString name;
00049         QWidget *tab;
00050         KIconCanvas *loadWid;
00051         QLabel *label;
00052         QMap<QString, QString> entries;
00053     };
00054 
00055     // set groups
00056     void getGroups();
00057 
00058     // setup tabs
00059     void setupTabs();
00060 
00061     // ********** variables **********
00062 
00063     // list of groups and a pointer to a group
00064     QPtrList<Group> groupList;
00065     Group *grpPtr;
00066 
00067 private slots:
00068 
00069     // name changed
00070     void nameChanged(QString);
00071     void tabChanged(QWidget *);
00072 
00073     // autoform chosen
00074     void chosen();
00075 
00076     void cancelClicked();
00077 
00078     void slotDoubleClick();
00079 protected:
00080     void closeEvent ( QCloseEvent * );
00081 
00082 signals:
00083 
00084     //autoform chosen
00085     void formChosen(const QString &);
00086     void afchooseCanceled();
00087 };
00088 
00089 #endif //AFCHOOSE_H
KDE Home | KDE Accessibility Home | Description of Access Keys