forked from qt-creator/qt-creator
Change-Id: Id7c90ac081dd63922c6289e5bc5233c588d982d6 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
60 lines
1.3 KiB
C++
60 lines
1.3 KiB
C++
// Copyright (C) 2016 Hugues Delorme
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
|
|
|
#pragma once
|
|
|
|
#include <QDialog>
|
|
|
|
#include <utils/pathchooser.h>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
class QCheckBox;
|
|
class QLineEdit;
|
|
class QRadioButton;
|
|
QT_END_NAMESPACE
|
|
|
|
namespace Bazaar::Internal {
|
|
|
|
class PullOrPushDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum Mode {
|
|
PullMode,
|
|
PushMode
|
|
};
|
|
|
|
explicit PullOrPushDialog(Mode mode, QWidget *parent = nullptr);
|
|
~PullOrPushDialog() override;
|
|
|
|
// Common parameters and options
|
|
QString branchLocation() const;
|
|
bool isRememberOptionEnabled() const;
|
|
bool isOverwriteOptionEnabled() const;
|
|
QString revision() const;
|
|
|
|
// Pull-specific options
|
|
bool isLocalOptionEnabled() const;
|
|
|
|
// Push-specific options
|
|
bool isUseExistingDirectoryOptionEnabled() const;
|
|
bool isCreatePrefixOptionEnabled() const;
|
|
|
|
private:
|
|
Mode m_mode;
|
|
|
|
QRadioButton *m_defaultButton;
|
|
QRadioButton *m_localButton;
|
|
Utils::PathChooser *m_localPathChooser;
|
|
QLineEdit *m_urlLineEdit;
|
|
QCheckBox *m_rememberCheckBox;
|
|
QCheckBox *m_overwriteCheckBox;
|
|
QCheckBox *m_useExistingDirCheckBox;
|
|
QCheckBox *m_createPrefixCheckBox;
|
|
QLineEdit *m_revisionLineEdit;
|
|
QCheckBox *m_localCheckBox;
|
|
};
|
|
|
|
} // Bazaar::Internal
|