コード例 #1
0
void GitSubmitEditorWidget::initialize(CommitType commitType,
                                       const QString &repository,
                                       const GitSubmitEditorPanelData &data,
                                       const GitSubmitEditorPanelInfo &info,
                                       bool enablePush)
{
    if (m_isInitialized)
        return;
    m_isInitialized = true;
    if (commitType == FixupCommit) {
        auto logChangeGroupBox = new QGroupBox(tr("Select Change"));
        auto logChangeLayout = new QVBoxLayout;
        logChangeGroupBox->setLayout(logChangeLayout);
        m_logChangeWidget = new LogChangeWidget;
        m_logChangeWidget->init(repository);
        connect(m_logChangeWidget, &LogChangeWidget::activated,
                this, &GitSubmitEditorWidget::show);
        logChangeLayout->addWidget(m_logChangeWidget);
        insertTopWidget(logChangeGroupBox);
        m_gitSubmitPanelUi.editGroup->hide();
        hideDescription();
    }
    insertTopWidget(m_gitSubmitPanel);
    setPanelData(data);
    setPanelInfo(info);

    if (enablePush) {
        auto menu = new QMenu(this);
        menu->addAction(tr("&Commit only"), this, SLOT(commitOnlySlot()));
        menu->addAction(tr("Commit and &Push"), this, SLOT(commitAndPushSlot()));
        addSubmitButtonMenu(menu);
    }
}
コード例 #2
0
void GitSubmitEditorWidget::initialize(CommitType commitType,
                                       const QString &repository,
                                       const GitSubmitEditorPanelData &data,
                                       const GitSubmitEditorPanelInfo &info,
                                       bool enablePush)
{
    if (m_isInitialized)
        return;
    m_isInitialized = true;
    if (commitType == FixupCommit) {
        QGroupBox *logChangeGroupBox = new QGroupBox(tr("Select Change"));
        QVBoxLayout *logChangeLayout = new QVBoxLayout;
        logChangeGroupBox->setLayout(logChangeLayout);
        m_logChangeWidget = new LogChangeWidget;
        m_logChangeWidget->init(repository, QString(), false);
        connect(m_logChangeWidget, SIGNAL(doubleClicked(QString)), this, SIGNAL(show(QString)));
        logChangeLayout->addWidget(m_logChangeWidget);
        insertTopWidget(logChangeGroupBox);
        m_gitSubmitPanelUi.editGroup->hide();
        hideDescription();
    }
    insertTopWidget(m_gitSubmitPanel);
    setPanelData(data);
    setPanelInfo(info);

    if (enablePush && commitType != FixupCommit) {
        QMenu *menu = new QMenu(this);
        menu->addAction(tr("&Commit only"), this, SLOT(commitOnlySlot()));
        menu->addAction(tr("Commit and &Push"), this, SLOT(commitAndPushSlot()));
        menu->addAction(tr("Commit and Push to &Gerrit"), this, SLOT(commitAndPushToGerritSlot()));
        addSubmitButtonMenu(menu);
    }
}
コード例 #3
0
MercurialCommitWidget::MercurialCommitWidget()
    : mercurialCommitPanel(new QWidget)
{
    mercurialCommitPanelUi.setupUi(mercurialCommitPanel);
    insertTopWidget(mercurialCommitPanel);
    new MercurialSubmitHighlighter(descriptionEdit());
}
コード例 #4
0
PerforceSubmitEditorWidget::PerforceSubmitEditorWidget(QWidget *parent) :
    Utils::SubmitEditorWidget(parent),
    m_submitPanel(new QGroupBox)
{
    m_submitPanelUi.setupUi(m_submitPanel);
    insertTopWidget(m_submitPanel);
}
コード例 #5
0
BazaarCommitWidget::BazaarCommitWidget(QWidget *parent) :
    Utils::SubmitEditorWidget(parent),
    m_bazaarCommitPanel(new QWidget)
{
    m_bazaarCommitPanelUi.setupUi(m_bazaarCommitPanel);
    insertTopWidget(m_bazaarCommitPanel);
    new BazaarSubmitHighlighter(descriptionEdit());
}
コード例 #6
0
// ------------------
GitSubmitEditorWidget::GitSubmitEditorWidget(QWidget *parent) :
    Utils::SubmitEditorWidget(parent),
    m_gitSubmitPanel(new QWidget)
{
    m_gitSubmitPanelUi.setupUi(m_gitSubmitPanel);
    insertTopWidget(m_gitSubmitPanel);
    new GitSubmitHighlighter(descriptionEdit());
}
コード例 #7
0
MercurialCommitWidget::MercurialCommitWidget(QWidget *parent) :
        Utils::SubmitEditorWidget(parent),
        mercurialCommitPanel(new QWidget)
{
    mercurialCommitPanelUi.setupUi(mercurialCommitPanel);
    insertTopWidget(mercurialCommitPanel);
    new MercurialSubmitHighlighter(descriptionEdit());
}
コード例 #8
0
// ------------------
GitSubmitEditorWidget::GitSubmitEditorWidget(QWidget *parent) :
    Utils::SubmitEditorWidget(parent),
    m_gitSubmitPanel(new QWidget)
{
    m_gitSubmitPanelUi.setupUi(m_gitSubmitPanel);
    insertTopWidget(m_gitSubmitPanel);
    new GitSubmitHighlighter(descriptionEdit());

    m_emailValidator = new QRegExpValidator(QRegExp(QLatin1String("[^@ ]+@[^@ ]+\\.[a-zA-Z]+")), this);

    connect(m_gitSubmitPanelUi.authorLineEdit, SIGNAL(textChanged(QString)),
            this, SLOT(authorInformationChanged()));
    connect(m_gitSubmitPanelUi.emailLineEdit, SIGNAL(textChanged(QString)),
            this, SLOT(authorInformationChanged()));
}
コード例 #9
0
PerforceSubmitEditorWidget::PerforceSubmitEditorWidget() :
    m_submitPanel(new QGroupBox)
{
    m_submitPanelUi.setupUi(m_submitPanel);
    insertTopWidget(m_submitPanel);
}