Files
qt-creator/src/plugins/projectexplorer/sessiondialog.h

91 lines
2.4 KiB
C
Raw Normal View History

/****************************************************************************
2008-12-02 12:01:29 +01:00
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
2008-12-02 12:01:29 +01:00
**
** This file is part of Qt Creator.
2008-12-02 12:01:29 +01: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
** 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.
**
** 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
**
****************************************************************************/
2008-12-02 16:19:05 +01:00
2008-12-02 12:01:29 +01:00
#ifndef SESSIONDIALOG_H
#define SESSIONDIALOG_H
#include "ui_sessiondialog.h"
#include <QString>
#include <QDialog>
2008-12-02 12:01:29 +01:00
QT_BEGIN_NAMESPACE
class QLineEdit;
class QPushButton;
QT_END_NAMESPACE
2008-12-02 12:01:29 +01:00
namespace ProjectExplorer {
namespace Internal {
class SessionDialog : public QDialog
{
Q_OBJECT
2008-12-02 12:01:29 +01:00
public:
explicit SessionDialog(QWidget *parent = 0);
2008-12-02 12:01:29 +01:00
void setAutoLoadSession(bool);
bool autoLoadSession() const;
2008-12-02 12:01:29 +01:00
private slots:
void createNew();
void clone();
void remove();
void rename();
void switchToSession();
2008-12-02 12:01:29 +01:00
void updateActions();
private:
void addItems(bool setDefaultSession);
void markItems();
void addSessionToUi(const QString &name, bool switchTo);
2008-12-02 12:01:29 +01:00
Ui::SessionDialog m_ui;
};
class SessionNameInputDialog : public QDialog
{
Q_OBJECT
public:
SessionNameInputDialog(const QStringList &sessions, QWidget *parent = 0);
void setValue(const QString &value);
QString value() const;
bool isSwitchToRequested() const;
private slots:
void clicked(QAbstractButton *button);
private:
QLineEdit *m_newSessionLineEdit;
QPushButton *m_switchToButton;
bool m_usedSwitchTo;
};
2008-12-02 16:19:05 +01:00
} // namespace Internal
} // namespace ProjectExplorer
2008-12-02 12:01:29 +01:00
#endif // SESSIONDIALOG_H