1/*
2 * Copyright (C) 2000 Matthias Elter <elter@kde.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program 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
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 *
18 */
19
20#ifndef basictab_h
21#define basictab_h
22
23#include <KTabWidget>
24#include <KShortcut>
25#include <KService>
26
27class KKeySequenceWidget;
28class KLineEdit;
29class KIconButton;
30class QCheckBox;
31class QGroupBox;
32class QLabel;
33class KUrlRequester;
34class KService;
35class KLineSpellChecking;
36
37class MenuFolderInfo;
38class MenuEntryInfo;
39
40class BasicTab : public KTabWidget
41{
42 Q_OBJECT
43
44public:
45 BasicTab( QWidget *parent=0 );
46
47 void apply();
48
49 void updateHiddenEntry( bool show );
50
51Q_SIGNALS:
52 void changed( MenuFolderInfo * );
53 void changed( MenuEntryInfo * );
54 void findServiceShortcut(const KShortcut&, KService::Ptr &);
55
56public Q_SLOTS:
57 void setFolderInfo(MenuFolderInfo *folderInfo);
58 void setEntryInfo(MenuEntryInfo *entryInfo);
59 void slotDisableAction();
60protected Q_SLOTS:
61 void slotChanged();
62 void launchcb_clicked();
63 void systraycb_clicked();
64 void termcb_clicked();
65 void uidcb_clicked();
66 void slotCapturedKeySequence(const QKeySequence&);
67 void slotExecSelected();
68 void onlyshowcb_clicked();
69 void hiddenentrycb_clicked();
70
71protected:
72 void enableWidgets(bool isDF, bool isDeleted);
73
74protected:
75 KLineEdit *_nameEdit;
76 KLineSpellChecking*_commentEdit;
77 KLineSpellChecking *_descriptionEdit;
78 KKeySequenceWidget *_keyEdit;
79 KUrlRequester *_execEdit, *_pathEdit;
80 KLineEdit *_termOptEdit, *_uidEdit;
81 QCheckBox *_terminalCB, *_uidCB, *_launchCB, *_systrayCB, *_onlyShowInKdeCB, *_hiddenEntryCB;
82 KIconButton *_iconButton;
83 QGroupBox *_path_group, *_term_group, *_uid_group, *general_group_keybind;
84 QLabel *_termOptLabel, *_uidLabel, *_pathLabel, *_nameLabel, *_commentLabel, *_execLabel;
85 QLabel *_descriptionLabel;
86
87 MenuFolderInfo *_menuFolderInfo;
88 MenuEntryInfo *_menuEntryInfo;
89};
90
91#endif
92