tuchulcha  0.10.1
Graphical Workflow Configuration Editor
ObjectInspector.h
Go to the documentation of this file.
1 /* Copyright (C) 2009 Jens-Malte Gottfried
2 
3  This file is part of Tuchulcha.
4 
5  Tuchulcha is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Tuchulcha is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with Tuchulcha. If not, see <http://www.gnu.org/licenses/>.
17 */
24 #ifndef OBJECTINSPECTOR_H_
25 #define OBJECTINSPECTOR_H_
26 
27 #include <QWidget>
28 
29 class ParameterFileModel;
30 class QTableView;
31 class QLineEdit;
32 class QFrame;
33 class QVBoxLayout;
34 class PrefixValidator;
35 class QTextEdit;
36 class QGroupBox;
37 class QMutex;
38 
39 namespace Ui {
40  class ObjectInspector;
41 }
42 
44 
48 class ObjectInspector : public QWidget {
49  Q_OBJECT
50 
51 public:
53 
58  QWidget* parent = 0,
60  bool hideTools = false);
61 
63  virtual ~ObjectInspector();
64 
66  ParameterFileModel* model() const;
67 
69  QWidget* getViewer();
70 
71 signals:
74  void modelChanged(ParameterFileModel* model);
75 
77 
81  void statusMessage(const QString& msg, int timeout = 3000);
82 
83 public slots:
85 
87  virtual void openFile(QString fName = QString());
88 
90 
92  virtual void openMetaData(QString fName = QString());
93 
95  virtual void saveFile() const;
96 
98  virtual void saveFileAs() const;
99 
102  virtual void setModel(ParameterFileModel* model);
103 
106  virtual void setEdit(bool on);
107 
109  void delParam();
110 
111 private slots:
113  // \{
115  void on_addButton_clicked();
116 
119 
122 
124  void on_clearButton_clicked();
125 
128 
130  void on_filterBox_activated(int index);
131 
134 
137 
139  void on_comment_textChanged();
140 
142  void on_prefix_textChanged(QString text);
143 
145  void on_useMetadata_toggled(bool state);
146 
148  void on_onlyParams_toggled(bool state);
149 
151  void setPrioColumnHidden(bool hide);
152  // \}
153 
156  // \{
158  void handle_model_prefixChanged(const QString& text);
159 
161  void handle_model_metaInfoChanged(bool state);
162 
164  void handle_model_useMetaInfoChanged(bool state);
165 
167  void handle_model_onlyParamsChanged(bool state);
168  // \}
169 
170 private:
172  Ui::ObjectInspector* _ui;
174  void _storeViewSettings() const;
176  void _loadViewSettings();
177 
180  QAction* _hidePrio;
181 };
182 
183 #endif /* OBJECTINSPECTOR_H_ */
void _storeViewSettings() const
save settings like column widths
virtual void openMetaData(QString fName=QString())
Open file containing metadata.
void on_ActivateAllButton_clicked()
Reactivate all consecutive plugins.
Ui::ObjectInspector * _ui
designer gui
QAction * _hidePrio
hide priority column
void handle_model_useMetaInfoChanged(bool state)
update useMetadata checkbox state
void on_setPriorityButton_clicked()
set priority
ParameterFileModel * _model
Used model to display.
void statusMessage(const QString &msg, int timeout=3000)
Send status message.
Object inspector widget.
void on_clearButton_clicked()
Clear model.
virtual void saveFileAs() const
Show SaveAs-Dialog and save File to the selected location.
void on_comment_textChanged()
handle comment changes
void on_onlyParams_toggled(bool state)
handle onlyParams checkbox changes
void modelChanged(ParameterFileModel *model)
Inform about changed model.
void handle_model_prefixChanged(const QString &text)
update prefix & comment text
void delParam()
delete parameter
void on_filterBox_activated(int index)
filter by priority
This model serves to provide a model frontend to access a ParameterFile instance. ...
ParameterFileModel * model() const
Get value of property _model.
void on_useMetadata_toggled(bool state)
handle useMetadata checkbox changes
virtual ~ObjectInspector()
default destructor
void on_resetParamButton_clicked()
reset parameter
void on_deleteButton_clicked()
Delete selected parameter.
virtual void saveFile() const
Save File to it's old location.
virtual void setEdit(bool on)
Enable/Disable structural editing.
virtual void openFile(QString fName=QString())
Open given file.
Validator for prefix edit widgets.
ObjectInspector(QWidget *parent=0, ParameterFileModel *model=0, bool hideTools=false)
Default constructor, setting parent widget.
QWidget * getViewer()
get inspector viewer widget
void _loadViewSettings()
restore settings like column widths
QMutex * _commentFieldMutex
lock for changes of comments
void setPrioColumnHidden(bool hide)
handle context menu of horizontal header
void on_prefix_textChanged(QString text)
handle prefix text field changes
void handle_model_onlyParamsChanged(bool state)
update onlyParams checkbox state
virtual void setModel(ParameterFileModel *model)
Change used model.
void on_resetFilterButton_clicked()
reset filter
void on_addButton_clicked()
Add new Parameter.
void handle_model_metaInfoChanged(bool state)
enable/disable useMetadata checkbox