diff options
Diffstat (limited to 'src/designer/src/lib/shared/iconselector_p.h')
-rw-r--r-- | src/designer/src/lib/shared/iconselector_p.h | 69 |
1 files changed, 28 insertions, 41 deletions
diff --git a/src/designer/src/lib/shared/iconselector_p.h b/src/designer/src/lib/shared/iconselector_p.h index 40e38acdd..4a4238e66 100644 --- a/src/designer/src/lib/shared/iconselector_p.h +++ b/src/designer/src/lib/shared/iconselector_p.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Designer of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // // W A R N I N G @@ -50,6 +25,8 @@ QT_BEGIN_NAMESPACE +class QComboBox; + class QtResourceModel; class QDesignerFormEditorInterface; class QDesignerDialogGuiInterface; @@ -81,8 +58,6 @@ private: QScopedPointer<class LanguageResourceDialogPrivate> d_ptr; Q_DECLARE_PRIVATE(LanguageResourceDialog) Q_DISABLE_COPY_MOVE(LanguageResourceDialog) - Q_PRIVATE_SLOT(d_func(), void slotAccepted()) - Q_PRIVATE_SLOT(d_func(), void slotPathChanged(QString)) }; @@ -114,14 +89,6 @@ private: QScopedPointer<class IconSelectorPrivate> d_ptr; Q_DECLARE_PRIVATE(IconSelector) Q_DISABLE_COPY_MOVE(IconSelector) - - Q_PRIVATE_SLOT(d_func(), void slotStateActivated()) - Q_PRIVATE_SLOT(d_func(), void slotSetActivated()) - Q_PRIVATE_SLOT(d_func(), void slotSetResourceActivated()) - Q_PRIVATE_SLOT(d_func(), void slotSetFileActivated()) - Q_PRIVATE_SLOT(d_func(), void slotResetActivated()) - Q_PRIVATE_SLOT(d_func(), void slotResetAllActivated()) - Q_PRIVATE_SLOT(d_func(), void slotUpdate()) }; // IconThemeEditor: Let's the user input theme icon names and shows a preview label. @@ -142,12 +109,32 @@ signals: public slots: void reset(); -private slots: - void slotChanged(const QString &); - private: - void updatePreview(const QString &); + QScopedPointer<IconThemeEditorPrivate> d; +}; + +// IconThemeEnumEditor: Let's the user input theme icon enum values +// (QIcon::ThemeIcon) and shows a preview label. -1 means nothing selected. +class QDESIGNER_SHARED_EXPORT IconThemeEnumEditor : public QWidget +{ + Q_OBJECT +public: + explicit IconThemeEnumEditor(QWidget *parent = nullptr, bool wantResetButton = true); + ~IconThemeEnumEditor() override; + int themeEnum() const; + void setThemeEnum(int); + + static QString iconName(int e); + static QComboBox *createComboBox(QWidget *parent = nullptr); + +signals: + void edited(int); + +public slots: + void reset(); + +private: QScopedPointer<IconThemeEditorPrivate> d; }; |