ZIMA CAD Parts
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
serverswidget.h
Go to the documentation of this file.
1 #ifndef SERVERSWIDGET_H
2 #define SERVERSWIDGET_H
3 
4 #include <QToolBox>
5 #include <QPushButton>
6 #include <QTreeView>
7 
8 #include "ui_serverswidget.h"
9 #include "serversmodel.h"
10 #include "settingsdialog.h"
11 #include "servertabwidget.h"
12 
13 class QSignalMapper;
14 
15 
20 {
21 public:
23  {
24  view->deleteLater();
25  model->deleteLater();
26  tab->deleteLater();
27  }
28 
29  int index;
31  QTreeView *view;
33 };
34 
35 
41 class ServersWidget : public QWidget, public Ui::ServersWidget
42 {
43  Q_OBJECT
44 public:
45  explicit ServersWidget(QWidget *parent = 0);
46  //void setModel(ServersModel *model);
47 
48  void retranslateMetadata();
49 
50  void refresh(Item* item);
51  void deleteFiles();
52  void uncheckAll();
53 
54  QModelIndex currentIndex();
55  void setModelindex(const QModelIndex &index);
56 
57 signals:
58  void statusUpdated(const QString &message);
60 
61  void itemLoaded(const QModelIndex&);
62  void clicked(const QModelIndex&);
63  void activated(const QModelIndex&);
64  // emit newly selected tree view root item to MainWindow to load toplevel files into part view
65  //void groupChanged(const QModelIndex&);
66 
67  void errorOccured(const QString &error);
68  void filesDownloaded();
69  void fileDownloaded(File*);
70 
71  void techSpecAvailable(const QUrl&);
72  void autoDescentProgress(const QModelIndex&);
73  void autoDescentComplete(const QModelIndex&);
74  void autoDescentNotFound();
75 
76  void workingDirChanged();
77 
78 public slots:
79  void expand(const QModelIndex & index);
80  void settingsChanged();
81  void goToWorkingDirectory();
82  void retranslateMetadata(int langIndex);
83 
84 private:
85  QList<ServersWidgetMap*> m_map;
86 
87  QSignalMapper *m_signalMapper;
88  QStringList m_zimaUtils;
89 
90 private slots:
91  void dirTreeContextMenu(QPoint point);
92  void spawnZimaUtilityOnDir(int i);
93 
94  void loadingItem(Item *i);
95  void allItemsLoaded();
96  void setWorkingDirectory();
97  void indexOpenPath();
98  void splitterMoved(int, int);
99 };
100 
101 #endif // SERVERSWIDGET_H
ServerTabWidget * tab
Definition: serverswidget.h:32
void setModelindex(const QModelIndex &index)
Definition: serverswidget.cpp:221
ServersModel * model
Definition: serverswidget.h:30
The data source tree and ServerTabWidget user interface.
Definition: serverswidget.h:41
void clicked(const QModelIndex &)
Section
Definition: settingsdialog.h:47
void retranslateMetadata()
Definition: serverswidget.cpp:138
void techSpecAvailable(const QUrl &)
void showSettings(SettingsDialog::Section)
ServersWidget(QWidget *parent=0)
Definition: serverswidget.cpp:15
void uncheckAll()
Definition: item.h:130
void workingDirChanged()
The tab widget displaying &quot;Parts&quot; tabs.
Definition: servertabwidget.h:23
void autoDescentNotFound()
Hold relations between QTreeView/ServersModel/ServerTabWidget.
Definition: serverswidget.h:19
void activated(const QModelIndex &)
void autoDescentProgress(const QModelIndex &)
~ServersWidgetMap()
Definition: serverswidget.h:22
Definition: item.h:41
void deleteFiles()
QModelIndex currentIndex()
Definition: serverswidget.cpp:206
void autoDescentComplete(const QModelIndex &)
void itemLoaded(const QModelIndex &)
void goToWorkingDirectory()
Definition: serverswidget.cpp:239
void settingsChanged()
Definition: serverswidget.cpp:36
void filesDownloaded()
int index
Definition: serverswidget.h:29
void errorOccured(const QString &error)
Definition: serversmodel.h:36
void expand(const QModelIndex &index)
Definition: serverswidget.cpp:201
void refresh(Item *item)
void statusUpdated(const QString &message)
void fileDownloaded(File *)
QTreeView * view
Definition: serverswidget.h:31