aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/advanceddockingsystem/workspaceinputdialog.h
blob: 0568e466b4aa13ad5dffaa02be9222e75fba28f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-2.1-or-later OR GPL-3.0-or-later

#pragma once

#include <QDialog>

QT_BEGIN_NAMESPACE
class QLineEdit;
class QPushButton;
QT_END_NAMESPACE

namespace ADS {

class DockManager;

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