File indexing completed on 2024-04-28 04:37:17
0001 /* 0002 SPDX-FileCopyrightText: 2010 Milian Wolff <mail@milianw.de> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KDEVPLATFORM_ENVIRONMENTCONFIGUREBUTTON_H 0008 #define KDEVPLATFORM_ENVIRONMENTCONFIGUREBUTTON_H 0009 0010 #include "shellexport.h" 0011 #include <QPushButton> 0012 0013 namespace KDevelop 0014 { 0015 0016 class EnvironmentSelectionWidget; 0017 class EnvironmentConfigureButtonPrivate; 0018 0019 /** 0020 * A tool button that shows a dialog to configure the environment settings. 0021 * You want to place that next to an @c EnvironmentSelectionWidget and pass 0022 * that one along. This button will automatically update the selection widget 0023 * if required then. 0024 */ 0025 class KDEVPLATFORMSHELL_EXPORT EnvironmentConfigureButton : public QPushButton 0026 { 0027 Q_OBJECT 0028 public: 0029 explicit EnvironmentConfigureButton(QWidget* parent = nullptr); 0030 ~EnvironmentConfigureButton() override; 0031 0032 void setSelectionWidget(EnvironmentSelectionWidget* widget); 0033 0034 Q_SIGNALS: 0035 /** 0036 * Gets emitted whenever the dialog was accepted 0037 * and the env settings might have changed. 0038 */ 0039 void environmentConfigured(); 0040 0041 private: 0042 const QScopedPointer<class EnvironmentConfigureButtonPrivate> d_ptr; 0043 Q_DECLARE_PRIVATE(EnvironmentConfigureButton) 0044 0045 friend class EnvironmentConfigureButtonPrivate; 0046 }; 0047 0048 } 0049 0050 #endif // KDEVPLATFORM_ENVIRONMENTCONFIGUREBUTTON_H