CloneGroupDialog.h
Go to the documentation of this file.
1/*
2* This file is part of ArmarX.
3*
4* ArmarX is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License version 2 as
6* published by the Free Software Foundation.
7*
8* ArmarX is distributed in the hope that it will be useful, but
9* WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*
16* @package ArmarX::
17* @author Valerij Wittenbeck (valerij.wittenbeck at student dot kit dot edu
18* @date 2015
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23#pragma once
24
25#include <QDialog>
26#include <QList>
27#include <QTableWidgetItem>
28
31
33
34namespace armarx::Ui
35{
36 class CloneGroupDialog;
37}
38
39namespace armarx
40{
41 class CloneGroupDialog : public QDialog
42 {
43 Q_OBJECT
44
45 public:
48 GroupClonerPtr groupCloner,
49 QWidget* parent = 0);
50 ~CloneGroupDialog() override;
52 QString getPackageName() const;
53 QString getPackagePath() const;
57 QVector<QPair<StatechartGroupPtr, QString>> getGroupsToClone() const;
58 QString getGroupPrefix() const;
59
60 public slots:
61 void verifyName(QTableWidgetItem* item);
62 void requestCheckPackagePath(QString path);
63 void requestPrefixUpdate(QString prefix);
64 void selectPackagePath();
65 void checkPackagePath();
66 void cloneRobotSkillTemplatesToggled(bool state);
67
68 private:
69 void buildGroupList();
70
71 Ui::CloneGroupDialog* ui;
74 GroupClonerPtr groupCloner;
76 QVector<StatechartGroupPtr> deps;
77 QVector<StatechartGroupPtr> groupsToClone;
78 QString groupPrefix;
79 QTimer* timer;
80 QRegExp validGroupNameRegExp;
81
82 QColor colorGreen;
83 QColor colorRed;
84 QColor colorYellow;
85
86 bool alreadyChecking;
87 void updateGroupDependencies();
88 };
89
90
91} // namespace armarx
GroupClonerPtr getGroupCloner() const
StatechartGroupMapping getStatechartGroupMapping() const
ArmarXPackageToolInterfacePtr getPackageTool() const
void verifyName(QTableWidgetItem *item)
void requestCheckPackagePath(QString path)
void cloneRobotSkillTemplatesToggled(bool state)
void requestPrefixUpdate(QString prefix)
CloneGroupDialog(ArmarXPackageToolInterfacePtr packageTool, StatechartGroupPtr group, GroupClonerPtr groupCloner, QWidget *parent=0)
StatechartGroupPtr getGroup() const
QVector< QPair< StatechartGroupPtr, QString > > getGroupsToClone() const
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< StatechartGroup > StatechartGroupPtr
std::shared_ptr< GroupCloner > GroupClonerPtr
Definition GroupCloner.h:46
std::shared_ptr< ArmarXPackageToolInterface > ArmarXPackageToolInterfacePtr