2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2020 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial
|
2020-01-24 17:13:32 +01:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "ui_workspacedialog.h"
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QLineEdit;
|
|
|
|
|
class QPushButton;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
namespace ADS {
|
|
|
|
|
|
|
|
|
|
class DockManager;
|
|
|
|
|
|
|
|
|
|
class WorkspaceDialog : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit WorkspaceDialog(DockManager *manager, QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
|
|
void setAutoLoadWorkspace(bool);
|
|
|
|
|
bool autoLoadWorkspace() const;
|
|
|
|
|
|
|
|
|
|
DockManager *dockManager() const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void updateActions(const QStringList &workspaces);
|
|
|
|
|
|
|
|
|
|
Ui::WorkspaceDialog m_ui;
|
|
|
|
|
|
|
|
|
|
DockManager *m_manager = nullptr;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class WorkspaceNameInputDialog : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit WorkspaceNameInputDialog(DockManager *manager, QWidget *parent);
|
|
|
|
|
|
|
|
|
|
void setActionText(const QString &actionText, const QString &openActionText);
|
|
|
|
|
void setValue(const QString &value);
|
|
|
|
|
QString value() const;
|
|
|
|
|
bool isSwitchToRequested() const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QLineEdit *m_newWorkspaceLineEdit = nullptr;
|
|
|
|
|
QPushButton *m_switchToButton = nullptr;
|
|
|
|
|
QPushButton *m_okButton = nullptr;
|
|
|
|
|
bool m_usedSwitchTo = false;
|
|
|
|
|
|
|
|
|
|
DockManager *m_manager;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace ADS
|