2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2016-02-02 18:26:51 +01:00
|
|
|
#pragma once
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QString>
|
|
|
|
|
#include <QDialog>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2012-02-23 17:50:30 +01:00
|
|
|
QT_BEGIN_NAMESPACE
|
2022-08-01 12:46:43 +02:00
|
|
|
class QCheckBox;
|
2012-02-23 17:50:30 +01:00
|
|
|
class QLineEdit;
|
|
|
|
|
class QPushButton;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2022-08-01 12:46:43 +02:00
|
|
|
namespace ProjectExplorer::Internal {
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
class SessionDialog : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2013-09-05 12:35:19 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public:
|
2016-04-13 15:52:14 +02:00
|
|
|
explicit SessionDialog(QWidget *parent = nullptr);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-09-14 11:37:54 +02:00
|
|
|
void setAutoLoadSession(bool);
|
|
|
|
|
bool autoLoadSession() const;
|
|
|
|
|
|
2016-01-29 16:38:37 +02:00
|
|
|
private:
|
2019-05-09 16:21:42 +02:00
|
|
|
void updateActions(const QStringList &sessions);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2022-09-22 22:17:19 +09:00
|
|
|
QPushButton *m_openButton;
|
2022-08-01 12:46:43 +02:00
|
|
|
QPushButton *m_renameButton;
|
|
|
|
|
QPushButton *m_cloneButton;
|
|
|
|
|
QPushButton *m_deleteButton;
|
|
|
|
|
QCheckBox *m_autoLoadCheckBox;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
2012-02-23 17:50:30 +01:00
|
|
|
class SessionNameInputDialog : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2016-02-02 18:26:51 +01:00
|
|
|
|
2012-02-23 17:50:30 +01:00
|
|
|
public:
|
2018-01-23 19:02:46 +01:00
|
|
|
explicit SessionNameInputDialog(QWidget *parent);
|
2012-02-23 17:50:30 +01:00
|
|
|
|
2017-05-29 17:46:59 +02:00
|
|
|
void setActionText(const QString &actionText, const QString &openActionText);
|
2012-02-23 17:50:30 +01:00
|
|
|
void setValue(const QString &value);
|
|
|
|
|
QString value() const;
|
|
|
|
|
bool isSwitchToRequested() const;
|
|
|
|
|
|
2016-01-29 16:38:37 +02:00
|
|
|
private:
|
2017-05-29 13:45:19 +02:00
|
|
|
QLineEdit *m_newSessionLineEdit = nullptr;
|
|
|
|
|
QPushButton *m_switchToButton = nullptr;
|
2017-05-29 17:46:59 +02:00
|
|
|
QPushButton *m_okButton = nullptr;
|
2017-05-29 13:45:19 +02:00
|
|
|
bool m_usedSwitchTo = false;
|
2012-02-23 17:50:30 +01:00
|
|
|
};
|
|
|
|
|
|
2022-08-01 12:46:43 +02:00
|
|
|
} // ProjectExplorer::Internal
|