RenameGroupDialog.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 
29 
31 #include <QTableWidgetItem>
32 
33 namespace armarx::Ui
34 {
35  class RenameGroupDialog;
36 }
37 
38 namespace armarx
39 {
40  class RenameGroupDialog : public QDialog
41  {
42  Q_OBJECT
43 
44  public:
45  explicit RenameGroupDialog(const StateTreeNodePtr& rootNode, const StateTreeModelPtr& treeModel, const StatechartGroupPtr& group, const GroupRenamerPtr& groupRenamer, QWidget* parent = 0);
46  ~RenameGroupDialog() override;
48  QString getPackageName() const;
49  QString getPackagePath() const;
52  bool isSaveAllRequested() const;
53  QVector<StatechartGroupPtr> getDependantGroups() const;
54  QVector<StatechartGroupPtr> getAllGroups() const;
55  QString getNewName() const;
56 
57  public slots:
59  void verifyNewName(QString newName);
60 
61  private:
62  void setOkButtonsEnabled(bool enabled);
63  Ui::RenameGroupDialog* ui;
64  StatechartGroupPtr group;
65  GroupRenamerPtr groupRenamer;
66  QRegExp validGroupName;
67 
68  QVector<StatechartGroupPtr> allGroups;
69  QVector<StatechartGroupPtr> dependantGroups;
70 
71  QColor colorGreen;
72  QColor colorRed;
73  QColor colorYellow;
74 
75  bool saveAll;
76  };
77 
78 
79 }
armarx::Ui
Definition: GuiUseCaseSelector.h:33
armarx::StateTreeModelPtr
std::shared_ptr< StateTreeModel > StateTreeModelPtr
Definition: StateTreeModel.h:44
armarx::RenameGroupDialog::getPackagePath
QString getPackagePath() const
armarx::RenameGroupDialog::getGroupRenamer
GroupRenamerPtr getGroupRenamer() const
Definition: RenameGroupDialog.cpp:118
armarx::ArmarXPackageToolInterfacePtr
std::shared_ptr< ArmarXPackageToolInterface > ArmarXPackageToolInterfacePtr
Definition: ArmarXPackageToolInterface.h:55
armarx::StateTreeNodePtr
std::shared_ptr< StateTreeNode > StateTreeNodePtr
Definition: StatechartGroupDefs.h:31
armarx::RenameGroupDialog::getGroup
StatechartGroupPtr getGroup() const
Definition: RenameGroupDialog.cpp:113
armarx::RenameGroupDialog::~RenameGroupDialog
~RenameGroupDialog() override
Definition: RenameGroupDialog.cpp:108
armarx::RenameGroupDialog::getDependantGroups
QVector< StatechartGroupPtr > getDependantGroups() const
Definition: RenameGroupDialog.cpp:128
armarx::RenameGroupDialog
Definition: RenameGroupDialog.h:40
enabled
std::atomic< bool > * enabled
Definition: RemoteGuiWidgetController.cpp:75
armarx::RenameGroupDialog::verifyNewName
void verifyNewName(QString newName)
Definition: RenameGroupDialog.cpp:149
armarx::StatechartGroupPtr
std::shared_ptr< StatechartGroup > StatechartGroupPtr
Definition: StatechartGroupDefs.h:34
GroupRenamer.h
armarx::RenameGroupDialog::getNewName
QString getNewName() const
Definition: RenameGroupDialog.cpp:138
armarx::RenameGroupDialog::saveAllProceedButtonClicked
void saveAllProceedButtonClicked()
Definition: RenameGroupDialog.cpp:143
armarx::GroupRenamerPtr
std::shared_ptr< GroupRenamer > GroupRenamerPtr
Definition: GroupRenamer.h:33
armarx::RenameGroupDialog::getPackageTool
ArmarXPackageToolInterfacePtr getPackageTool() const
armarx::RenameGroupDialog::isSaveAllRequested
bool isSaveAllRequested() const
Definition: RenameGroupDialog.cpp:123
armarx::RenameGroupDialog::getAllGroups
QVector< StatechartGroupPtr > getAllGroups() const
Definition: RenameGroupDialog.cpp:133
armarx::RenameGroupDialog::getPackageName
QString getPackageName() const
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
VariantInfo.h
armarx::RenameGroupDialog::RenameGroupDialog
RenameGroupDialog(const StateTreeNodePtr &rootNode, const StateTreeModelPtr &treeModel, const StatechartGroupPtr &group, const GroupRenamerPtr &groupRenamer, QWidget *parent=0)
Definition: RenameGroupDialog.cpp:38