AFChoose.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef AFCHOOSE_H
21#define AFCHOOSE_H
22
23#include <tqtabdialog.h>
24#include <tqptrlist.h>
25#include <tqmap.h>
26#include <tqfileinfo.h>
27
28class TQLabel;
29class TDEIconCanvas;
30
31class AFChoose : public TQTabDialog
32{
33 TQ_OBJECT
34
35
36public:
37
38 // constructor - destructor
39 AFChoose(TQWidget *parent=0, const TQString &caption=TQString(), const char *name=0);
40 ~AFChoose();
41
42private:
43
44 // structure of a group
45 struct Group
46 {
47 TQFileInfo dir;
48 TQString name;
49 TQWidget *tab;
50 TDEIconCanvas *loadWid;
51 TQLabel *label;
52 TQMap<TQString, TQString> entries;
53 };
54
55 // set groups
56 void getGroups();
57
58 // setup tabs
59 void setupTabs();
60
61 // ********** variables **********
62
63 // list of groups and a pointer to a group
64 TQPtrList<Group> groupList;
65 Group *grpPtr;
66
67private slots:
68
69 // name changed
70 void nameChanged(TQString);
71 void tabChanged(TQWidget *);
72
73 // autoform chosen
74 void chosen();
75
76 void cancelClicked();
77
78 void slotDoubleClick();
79protected:
80 void closeEvent ( TQCloseEvent * );
81
82signals:
83
84 //autoform chosen
85 void formChosen(const TQString &);
86 void afchooseCanceled();
87};
88
89#endif //AFCHOOSE_H