File indexing completed on 2024-12-15 04:54:45
0001 /* SPDX-FileCopyrightText: 2009 James Bendig <james@imptalk.com> 0002 0003 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 */ 0005 #pragma once 0006 0007 #include "messagelist_export.h" 0008 #include <QPushButton> 0009 0010 namespace MessageList 0011 { 0012 namespace Utils 0013 { 0014 class ThemeComboBox; 0015 class ThemeConfigButtonPrivate; 0016 0017 /** 0018 * A specialized QPushButton that displays the theme 0019 * configure dialog when pressed. 0020 */ 0021 class MESSAGELIST_EXPORT ThemeConfigButton : public QPushButton 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 /** Constructor. 0027 * @param parent The parent widget for the button. 0028 * @param themeComboBox Optional ThemeComboBox to be kept in sync 0029 * with changes made by the configure dialog. 0030 */ 0031 explicit ThemeConfigButton(QWidget *parent, const ThemeComboBox *themeComboBox = nullptr); 0032 ~ThemeConfigButton() override; 0033 0034 Q_SIGNALS: 0035 /** 0036 * A signal emitted when configure dialog has been successfully completed. 0037 */ 0038 void configureDialogCompleted(); 0039 0040 private: 0041 std::unique_ptr<ThemeConfigButtonPrivate> const d; 0042 }; 0043 } // namespace Utils 0044 } // namespace MessageList