forked from qt-creator/qt-creator
Git: Use IOptionPage::setWidgetCreator() for gerrit settings
Change-Id: I7402f3342bb11726ec7383c807fa98052cb38bd8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -6,57 +6,20 @@
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
#include <QSharedPointer>
|
||||
#include <QPointer>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QLineEdit;
|
||||
class QSpinBox;
|
||||
class QCheckBox;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Utils { class PathChooser; }
|
||||
namespace Gerrit {
|
||||
namespace Internal {
|
||||
namespace Gerrit::Internal {
|
||||
|
||||
class GerritParameters;
|
||||
|
||||
class GerritOptionsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GerritOptionsWidget(QWidget *parent = nullptr);
|
||||
|
||||
GerritParameters parameters() const;
|
||||
void setParameters(const GerritParameters &);
|
||||
|
||||
private:
|
||||
QLineEdit *m_hostLineEdit;
|
||||
QLineEdit *m_userLineEdit;
|
||||
Utils::PathChooser *m_sshChooser;
|
||||
Utils::PathChooser *m_curlChooser;
|
||||
QSpinBox *m_portSpinBox;
|
||||
QCheckBox *m_httpsCheckBox;
|
||||
};
|
||||
|
||||
class GerritOptionsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GerritOptionsPage(const QSharedPointer<GerritParameters> &p, QObject *parent = nullptr);
|
||||
~GerritOptionsPage() override;
|
||||
|
||||
QWidget *widget() override;
|
||||
void apply() override;
|
||||
void finish() override;
|
||||
|
||||
signals:
|
||||
void settingsChanged();
|
||||
|
||||
private:
|
||||
const QSharedPointer<GerritParameters> &m_parameters;
|
||||
QPointer<GerritOptionsWidget> m_widget;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Gerrit
|
||||
} // Gerrit::Internal
|
||||
|
||||
Reference in New Issue
Block a user