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>
34 class KServiceListWidget
;
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
46 FileTypeDetails(QWidget
*parent
= 0);
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 );
55 void updateRemoveButton();
59 void embedMajor(const QString
&major
, bool &embed
); // To adjust whether major type is being embedded
63 //void updateIcon(const QString &icon);
64 void updateDescription(const QString
&desc
);
66 void removeExtension();
67 void enableExtButtons();
68 void slotAutoEmbedClicked(int button
);
69 void slotAskSaveToggled(bool);
72 MimeTypeData
* m_mimeTypeData
;
73 TypesListItem
* m_item
; // can be 0, in keditfiletype!
75 // First tab - General
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
;