TaskView.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef GUI_TASKVIEW_TASKVIEW_H
00025 #define GUI_TASKVIEW_TASKVIEW_H
00026
00027 #include <map>
00028 #include <string>
00029 #include <vector>
00030 #include <boost/signals.hpp>
00031
00032 #include <Gui/iisTaskPanel/include/iisTaskPanel>
00033 #include <Gui/Selection.h>
00034 #include "TaskWatcher.h"
00035
00036 namespace App {
00037 class Property;
00038 }
00039
00040 namespace Gui {
00041 class ControlSingleton;
00042 namespace DockWnd{
00043 class CombiView;
00044 }
00045 namespace TaskView {
00046
00047 typedef boost::signals::connection Connection;
00048 class TaskEditControl;
00049 class TaskDialog;
00050
00052 class GuiExport TaskContent
00053 {
00054
00055 public:
00056
00057
00058 };
00059
00061 class GuiExport TaskBox : public iisTaskBox, public TaskContent
00062 {
00063 Q_OBJECT
00064
00065 public:
00066 TaskBox(const QPixmap &icon, const QString &title, bool expandable, QWidget *parent);
00067 ~TaskBox();
00068 void hideGroupBox();
00069
00070 protected:
00071 void showEvent(QShowEvent*);
00072 void actionEvent (QActionEvent*);
00073
00074 private:
00075 bool wasShown;
00076 };
00077
00079 class GuiExport TaskWidget : public QWidget, public TaskContent
00080 {
00081 Q_OBJECT
00082
00083 public:
00084 TaskWidget(QWidget *parent=0);
00085 ~TaskWidget();
00086 };
00087
00093 class GuiExport TaskView : public QScrollArea, public Gui::SelectionSingleton::ObserverType
00094 {
00095 Q_OBJECT
00096
00097 public:
00098 TaskView(QWidget *parent = 0);
00099 ~TaskView();
00100
00102 virtual void OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
00103 Gui::SelectionSingleton::MessageType Reason);
00104
00105 friend class Gui::DockWnd::CombiView;
00106 friend class Gui::ControlSingleton;
00107
00108 void addTaskWatcher(const std::vector<TaskWatcher*> &Watcher);
00109 void clearTaskWatcher(void);
00110
00111 protected Q_SLOTS:
00112 void accept();
00113 void reject();
00114 void helpRequested();
00115 void clicked (QAbstractButton * button);
00116
00117 protected:
00118 void keyPressEvent(QKeyEvent*);
00119 void addTaskWatcher(void);
00120 void removeTaskWatcher(void);
00122 void updateWatcher(void);
00124 void showDialog(TaskDialog *dlg);
00125
00126 void removeDialog(void);
00127
00128 void slotActiveDocument(const App::Document&);
00129 void slotDeletedDocument();
00130
00131 std::vector<TaskWatcher*> ActiveWatcher;
00132
00133 iisTaskPanel* taskPanel;
00134 TaskDialog *ActiveDialog;
00135 TaskEditControl *ActiveCtrl;
00136
00137 Connection connectApplicationActiveDocument;
00138 Connection connectApplicationDeleteDocument;
00139 };
00140
00141 }
00142 }
00143
00144 #endif // GUI_TASKVIEW_TASKVIEW_H