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 
30 
32 #include <QTableWidgetItem>
33 
34 namespace armarx::Ui
35 {
36  class CloneGroupDialog;
37 }
38 
39 namespace armarx
40 {
41  class CloneGroupDialog : public QDialog
42  {
43  Q_OBJECT
44 
45  public:
46  explicit CloneGroupDialog(ArmarXPackageToolInterfacePtr packageTool, StatechartGroupPtr group, GroupClonerPtr groupCloner, QWidget* parent = 0);
47  ~CloneGroupDialog() override;
49  QString getPackageName() const;
50  QString getPackagePath() const;
54  QVector<QPair<StatechartGroupPtr, QString>> getGroupsToClone() const;
55  QString getGroupPrefix() const;
56 
57  public slots:
58  void verifyName(QTableWidgetItem* item);
59  void requestCheckPackagePath(QString path);
60  void requestPrefixUpdate(QString prefix);
61  void selectPackagePath();
62  void checkPackagePath();
63  void cloneRobotSkillTemplatesToggled(bool state);
64 
65  private:
66  void buildGroupList();
67 
68  Ui::CloneGroupDialog* ui;
70  StatechartGroupPtr group;
71  GroupClonerPtr groupCloner;
72  StatechartGroupMapping mapping;
73  QVector<StatechartGroupPtr> deps;
74  QVector<StatechartGroupPtr> groupsToClone;
75  QString groupPrefix;
76  QTimer* timer;
77  QRegExp validGroupNameRegExp;
78 
79  QColor colorGreen;
80  QColor colorRed;
81  QColor colorYellow;
82 
83  bool alreadyChecking;
84  void updateGroupDependencies();
85  };
86 
87 
88 }
armarx::CloneGroupDialog::cloneRobotSkillTemplatesToggled
void cloneRobotSkillTemplatesToggled(bool state)
Definition: CloneGroupDialog.cpp:218
armarx::CloneGroupDialog::getPackageTool
ArmarXPackageToolInterfacePtr getPackageTool() const
Definition: CloneGroupDialog.cpp:74
armarx::CloneGroupDialog::verifyName
void verifyName(QTableWidgetItem *item)
Definition: CloneGroupDialog.cpp:155
armarx::Ui
Definition: GuiUseCaseSelector.h:33
armarx::CloneGroupDialog::getPackageName
QString getPackageName() const
Definition: CloneGroupDialog.cpp:79
armarx::ArmarXPackageToolInterfacePtr
std::shared_ptr< ArmarXPackageToolInterface > ArmarXPackageToolInterfacePtr
Definition: ArmarXPackageToolInterface.h:55
armarx::CloneGroupDialog::selectPackagePath
void selectPackagePath()
Definition: CloneGroupDialog.cpp:293
armarx::CloneGroupDialog::checkPackagePath
void checkPackagePath()
Definition: CloneGroupDialog.cpp:347
armarx::CloneGroupDialog::getStatechartGroupMapping
StatechartGroupMapping getStatechartGroupMapping() const
Definition: CloneGroupDialog.cpp:117
armarx::CloneGroupDialog
Definition: CloneGroupDialog.h:41
armarx::CloneGroupDialog::CloneGroupDialog
CloneGroupDialog(ArmarXPackageToolInterfacePtr packageTool, StatechartGroupPtr group, GroupClonerPtr groupCloner, QWidget *parent=0)
Definition: CloneGroupDialog.cpp:39
armarx::GroupClonerPtr
std::shared_ptr< GroupCloner > GroupClonerPtr
Definition: GroupCloner.h:46
armarx::StatechartGroupMapping
Definition: StatechartGroupMapping.h:34
ArmarXPackageToolInterface.h
armarx::CloneGroupDialog::getGroupsToClone
QVector< QPair< StatechartGroupPtr, QString > > getGroupsToClone() const
Definition: CloneGroupDialog.cpp:122
armarx::CloneGroupDialog::getGroupCloner
GroupClonerPtr getGroupCloner() const
Definition: CloneGroupDialog.cpp:112
armarx::CloneGroupDialog::getPackagePath
QString getPackagePath() const
Definition: CloneGroupDialog.cpp:85
armarx::StatechartGroupPtr
std::shared_ptr< StatechartGroup > StatechartGroupPtr
Definition: StatechartGroupDefs.h:34
armarx::CloneGroupDialog::getGroup
StatechartGroupPtr getGroup() const
Definition: CloneGroupDialog.cpp:107
armarx::CloneGroupDialog::requestCheckPackagePath
void requestCheckPackagePath(QString path)
Definition: CloneGroupDialog.cpp:207
GroupCloner.h
armarx::CloneGroupDialog::getGroupPrefix
QString getGroupPrefix() const
Definition: CloneGroupDialog.cpp:150
armarx::CloneGroupDialog::requestPrefixUpdate
void requestPrefixUpdate(QString prefix)
Definition: CloneGroupDialog.cpp:212
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::CloneGroupDialog::~CloneGroupDialog
~CloneGroupDialog() override
Definition: CloneGroupDialog.cpp:69
VariantInfo.h