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