summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/mimetypesettings.h
diff options
context:
space:
mode:
authorLeandro Melo <leandro.melo@nokia.com>2011-02-22 15:11:50 +0100
committerLeandro Melo <leandro.melo@nokia.com>2011-03-02 10:13:40 +0100
commit3db53206c2e4908cfc86b65918cad2127f2174cd (patch)
treee179c08a32375cfb6e91e99fece1d5babe068389 /src/plugins/coreplugin/mimetypesettings.h
parentc8f19854f9dae2148ba1a20c93ec5233f1f88aea (diff)
downloadqt-creator-3db53206c2e4908cfc86b65918cad2127f2174cd.tar.gz
MIME types: Introduce user extensions feature
Creates a new page in the options dialog which allows the user to modify MIME type's globl patterns and rule-based magic matchers. As a side-effect of this feature our MIME database (and related components) got some improvements. Reviewed-by: Friedemann Kleint
Diffstat (limited to 'src/plugins/coreplugin/mimetypesettings.h')
-rw-r--r--src/plugins/coreplugin/mimetypesettings.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/mimetypesettings.h b/src/plugins/coreplugin/mimetypesettings.h
new file mode 100644
index 0000000000..6faa93ccd3
--- /dev/null
+++ b/src/plugins/coreplugin/mimetypesettings.h
@@ -0,0 +1,72 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** No Commercial Usage
+**
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
+
+#ifndef MIMETYPESETTINGSPAGE_H
+#define MIMETYPESETTINGSPAGE_H
+
+#include "ioptionspage.h"
+
+#include <QtCore/QScopedPointer>
+
+namespace Core {
+namespace Internal {
+
+class MimeTypeSettingsPrivate;
+
+class MimeTypeSettings : public IOptionsPage
+{
+ Q_OBJECT
+
+public:
+ MimeTypeSettings(QObject *parent = 0);
+ virtual ~MimeTypeSettings();
+
+ virtual QString id() const;
+ virtual QString displayName() const;
+ virtual QString category() const;
+ virtual QString displayCategory() const;
+ virtual QIcon categoryIcon() const;
+ virtual bool matches(const QString &s) const;
+
+ virtual QWidget *createPage(QWidget *parent);
+ virtual void apply();
+ virtual void finish();
+
+private:
+ QScopedPointer<MimeTypeSettingsPrivate> m_d;
+};
+
+} // Internal
+} // Core
+
+#endif // MIMETYPESETTINGSPAGE_H