aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clearcase/clearcasesubmiteditorwidget.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2011-06-05 17:58:02 +0300
committerhjk <qthjk@ovi.com>2012-08-18 19:42:57 +0200
commit647071d84b4d214636985f743b40db1832cf7bf1 (patch)
treec980417573ef41b1df591f0b6279555bb0e20e88 /src/plugins/clearcase/clearcasesubmiteditorwidget.cpp
parent0fcf5515e5efa9549bb7e62a8b8a35075ada8949 (diff)
Introduce ClearCase plugin
Change-Id: Ib2cebaff0f035f48ca958cad16dedfdd80f4bff9 Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/clearcase/clearcasesubmiteditorwidget.cpp')
-rw-r--r--src/plugins/clearcase/clearcasesubmiteditorwidget.cpp101
1 files changed, 101 insertions, 0 deletions
diff --git a/src/plugins/clearcase/clearcasesubmiteditorwidget.cpp b/src/plugins/clearcase/clearcasesubmiteditorwidget.cpp
new file mode 100644
index 00000000000..b55e20f5fc8
--- /dev/null
+++ b/src/plugins/clearcase/clearcasesubmiteditorwidget.cpp
@@ -0,0 +1,101 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2012 AudioCodes Ltd.
+**
+** Author: Orgad Shaneh <orgad.shaneh@audiocodes.com>
+**
+** Contact: http://www.qt-project.org/
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**************************************************************************/
+
+#include "activityselector.h"
+#include "clearcasesubmiteditorwidget.h"
+
+#include <vcsbase/submitfilemodel.h>
+
+#include <QCheckBox>
+#include <QFrame>
+#include <QVBoxLayout>
+
+using namespace ClearCase::Internal;
+
+ClearCaseSubmitEditorWidget::ClearCaseSubmitEditorWidget(QWidget *parent) :
+ Utils::SubmitEditorWidget(parent)
+{
+ setDescriptionMandatory(false);
+ QWidget *checkInWidget = new QWidget(this);
+
+ QVBoxLayout *verticalLayout = new QVBoxLayout(checkInWidget);
+ m_actSelector = new ActivitySelector;
+ verticalLayout->addWidget(m_actSelector);
+
+ QFrame *line = new QFrame;
+ line->setFrameShape(QFrame::HLine);
+ line->setFrameShadow(QFrame::Sunken);
+ verticalLayout->addWidget(line);
+
+ m_chkIdentical = new QCheckBox(tr("Chec&k in even if identical to previous version"));
+ verticalLayout->addWidget(m_chkIdentical);
+
+ m_chkPTime = new QCheckBox(tr("&Preserve file modification time"));
+ verticalLayout->addWidget(m_chkPTime);
+
+ insertTopWidget(checkInWidget);
+}
+
+QString ClearCaseSubmitEditorWidget::activity() const
+{
+ return m_actSelector->activity();
+}
+
+bool ClearCaseSubmitEditorWidget::isIdentical() const
+{
+ return m_chkIdentical->isChecked();
+}
+
+bool ClearCaseSubmitEditorWidget::isPreserve() const
+{
+ return m_chkPTime->isChecked();
+}
+
+void ClearCaseSubmitEditorWidget::setActivity(const QString &act)
+{
+ m_actSelector->setActivity(act);
+}
+
+bool ClearCaseSubmitEditorWidget::activityChanged() const
+{
+ return m_actSelector->changed();
+}
+
+void ClearCaseSubmitEditorWidget::addKeep()
+{
+ m_actSelector->addKeep();
+}
+
+QString ClearCaseSubmitEditorWidget::commitName() const
+{
+ return tr("&Check In");
+}