NCL Composer  0.1.5
 All Classes Functions Variables Pages
PerspectiveManager.h
1 /* Copyright (c) 2011 Telemidia/PUC-Rio.
2  * All rights reserved. This program and the accompanying materials
3  * are made available under the terms of the Eclipse Public License v1.0
4  * which accompanies this distribution, and is available at
5  * http://www.eclipse.org/legal/epl-v10.html
6  *
7  * Contributors:
8  * Telemidia/PUC-Rio - initial API and implementation
9  */
10 #ifndef PLUGINSLAYOUTMANAGER_H
11 #define PLUGINSLAYOUTMANAGER_H
12 
13 #include <QDialog>
14 #include <QTreeWidgetItem>
15 
16 namespace Ui{
17  class PerpectiveManager;
18 }
19 
24 enum PERSPEC_BEHAVIOR { //PERSPECTIVE BEHAVIOR
25  PERSPEC_SAVE = 0,
26  PERSPEC_LOAD
27 };
28 
29 namespace composer {
30  namespace gui {
34 class PerspectiveManager: public QDialog {
35  Q_OBJECT
36 
37 public:
42  PerspectiveManager(QWidget *parent = 0);
46  virtual ~PerspectiveManager();
52  QString getSelectedName();
58  QString getDefaultPerspective();
65  void setBehavior(PERSPEC_BEHAVIOR behavior);
66 
67 public slots:
71  void accept();
72 
73 private slots:
77  void deleteSelectedPerspective();
78 
82  void itemChanged(QTreeWidgetItem *, int);
83 
84 protected:
88  void showEvent(QShowEvent *);
94  void deletePerspective(QString name);
95 
96 private:
97  Ui::PerpectiveManager *ui;
99  QString selectedName;
100  QString defaultPerspective;
101  PERSPEC_BEHAVIOR behavior;
104  bool internalChange;
105  void updateContent();
106 };
107 } } //end namespace
108 #endif // PLUGINSLAYOUTMANAGER_H