Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / apps / konqueror / settings / filetypes / filetypedetails.h
blobf5ddff4199c49dfef3ec8322350553e3ea9cde29
1 /* This file is part of the KDE project
2 Copyright (C) 2000, 2007 David Faure <faure@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License version 2 or at your option version 3 as published by
7 the Free Software Foundation.
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 GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef _FILETYPEDETAILS_H
21 #define _FILETYPEDETAILS_H
23 #include <QtGui/QTabWidget>
24 class MimeTypeData;
25 class TypesListItem;
26 class QLabel;
27 class QLineEdit;
28 class QListWidget;
29 class QGroupBox;
30 class QButtonGroup;
31 class QCheckBox;
32 class QRadioButton;
33 class QPushButton;
34 class KServiceListWidget;
36 /**
37 * This widget contains the right part of the file type configuration
38 * dialog, that shows the details for a file type.
39 * It is implemented as a separate class so that it can be used by
40 * the keditfiletype program to show the details of a single mimetype.
42 class FileTypeDetails : public QTabWidget
44 Q_OBJECT
45 public:
46 FileTypeDetails(QWidget *parent = 0);
48 /**
49 * Set a non-gui "mimetype data" to work on,
50 * and optionally a gui "treeview item", to update its icon if set.
52 void setMimeTypeData( MimeTypeData * mimeTypeData, TypesListItem* item = 0 );
54 protected:
55 void updateRemoveButton();
56 void updateAskSave();
58 Q_SIGNALS:
59 void embedMajor(const QString &major, bool &embed); // To adjust whether major type is being embedded
60 void changed(bool);
62 protected Q_SLOTS:
63 //void updateIcon(const QString &icon);
64 void updateDescription(const QString &desc);
65 void addExtension();
66 void removeExtension();
67 void enableExtButtons();
68 void slotAutoEmbedClicked(int button);
69 void slotAskSaveToggled(bool);
71 private:
72 MimeTypeData* m_mimeTypeData;
73 TypesListItem* m_item; // can be 0, in keditfiletype!
75 // First tab - General
76 QLabel *iconButton;
77 QListWidget *extensionLB;
78 QPushButton *addExtButton, *removeExtButton;
79 QLineEdit *description;
80 KServiceListWidget *serviceListWidget;
82 // Second tab - Embedding
83 QGroupBox *m_autoEmbedBox;
84 QButtonGroup *m_autoEmbedGroup;
85 KServiceListWidget *embedServiceListWidget;
86 QRadioButton *m_rbOpenSeparate;
87 QCheckBox *m_chkAskSave;
88 QRadioButton *m_rbGroupSettings;
91 #endif