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 
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:
47  StatechartGroupPtr group,
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;
73  StatechartGroupPtr group;
74  GroupClonerPtr groupCloner;
75  StatechartGroupMapping mapping;
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
armarx::CloneGroupDialog::cloneRobotSkillTemplatesToggled
void cloneRobotSkillTemplatesToggled(bool state)
Definition: CloneGroupDialog.cpp:247
armarx::CloneGroupDialog::getPackageTool
ArmarXPackageToolInterfacePtr getPackageTool() const
Definition: CloneGroupDialog.cpp:91
armarx::CloneGroupDialog::verifyName
void verifyName(QTableWidgetItem *item)
Definition: CloneGroupDialog.cpp:181
armarx::Ui
Definition: GuiUseCaseSelector.h:33
armarx::CloneGroupDialog::getPackageName
QString getPackageName() const
Definition: CloneGroupDialog.cpp:97
armarx::ArmarXPackageToolInterfacePtr
std::shared_ptr< ArmarXPackageToolInterface > ArmarXPackageToolInterfacePtr
Definition: ArmarXPackageToolInterface.h:71
armarx::CloneGroupDialog::selectPackagePath
void selectPackagePath()
Definition: CloneGroupDialog.cpp:328
armarx::CloneGroupDialog::checkPackagePath
void checkPackagePath()
Definition: CloneGroupDialog.cpp:387
armarx::CloneGroupDialog::getStatechartGroupMapping
StatechartGroupMapping getStatechartGroupMapping() const
Definition: CloneGroupDialog.cpp:139
armarx::CloneGroupDialog
Definition: CloneGroupDialog.h:41
armarx::CloneGroupDialog::CloneGroupDialog
CloneGroupDialog(ArmarXPackageToolInterfacePtr packageTool, StatechartGroupPtr group, GroupClonerPtr groupCloner, QWidget *parent=0)
Definition: CloneGroupDialog.cpp:40
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:145
armarx::CloneGroupDialog::getGroupCloner
GroupClonerPtr getGroupCloner() const
Definition: CloneGroupDialog.cpp:133
armarx::CloneGroupDialog::getPackagePath
QString getPackagePath() const
Definition: CloneGroupDialog.cpp:104
armarx::StatechartGroupPtr
std::shared_ptr< StatechartGroup > StatechartGroupPtr
Definition: StatechartGroupDefs.h:34
armarx::CloneGroupDialog::getGroup
StatechartGroupPtr getGroup() const
Definition: CloneGroupDialog.cpp:127
armarx::CloneGroupDialog::requestCheckPackagePath
void requestCheckPackagePath(QString path)
Definition: CloneGroupDialog.cpp:234
GroupCloner.h
armarx::CloneGroupDialog::getGroupPrefix
QString getGroupPrefix() const
Definition: CloneGroupDialog.cpp:175
armarx::CloneGroupDialog::requestPrefixUpdate
void requestPrefixUpdate(QString prefix)
Definition: CloneGroupDialog.cpp:240
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::CloneGroupDialog::~CloneGroupDialog
~CloneGroupDialog() override
Definition: CloneGroupDialog.cpp:85
VariantInfo.h