2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** 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
|
2016-01-15 14:57:40 +01:00
|
|
|
** 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.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** 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.
|
2010-12-17 16:01:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
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-08-01 12:46:43 +02:00
|
|
|
QPushButton *m_renameButton;
|
|
|
|
|
QPushButton *m_cloneButton;
|
|
|
|
|
QPushButton *m_deleteButton;
|
|
|
|
|
QPushButton *m_switchButton;
|
|
|
|
|
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
|