| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| |
|
| |
|
| | #ifndef GUI_TASKVIEW_TASKVIEW_H
|
| | #define GUI_TASKVIEW_TASKVIEW_H
|
| |
|
| | #include <vector>
|
| | #include <QScrollArea>
|
| |
|
| | #include <Base/Parameter.h>
|
| | #include <Gui/QSint/include/QSint>
|
| | #include <Gui/Selection/Selection.h>
|
| | #include "TaskWatcher.h"
|
| |
|
| |
|
| | namespace App
|
| | {
|
| | class Property;
|
| | }
|
| |
|
| | namespace Gui
|
| | {
|
| | class MDIView;
|
| | class ControlSingleton;
|
| | class ViewProviderDocumentObject;
|
| | namespace DockWnd
|
| | {
|
| | class ComboView;
|
| | }
|
| | namespace TaskView
|
| | {
|
| |
|
| | using Connection = fastsignals::connection;
|
| | class TaskEditControl;
|
| | class TaskDialog;
|
| |
|
| |
|
| | class GuiExport TaskContent {
|
| |
|
| | public :
|
| |
|
| |
|
| | };
|
| |
|
| | class GuiExport TaskGroup: public QSint::ActionBox, public TaskContent
|
| | {
|
| | Q_OBJECT
|
| |
|
| | public:
|
| | explicit TaskGroup(QWidget* parent = nullptr);
|
| | explicit TaskGroup(const QString& headerText, QWidget* parent = nullptr);
|
| | explicit TaskGroup(const QPixmap& icon, const QString& headerText, QWidget* parent = nullptr);
|
| | ~TaskGroup() override;
|
| |
|
| | protected:
|
| | void actionEvent(QActionEvent*) override;
|
| | };
|
| |
|
| |
|
| | class GuiExport TaskBox: public QSint::ActionGroup, public TaskContent
|
| | {
|
| | Q_OBJECT
|
| |
|
| | public:
|
| | |
| |
|
| | explicit TaskBox(QWidget* parent = nullptr);
|
| |
|
| | |
| | |
| | |
| | |
| |
|
| | explicit TaskBox(const QString& title, bool expandable = true, QWidget* parent = nullptr);
|
| |
|
| | |
| | |
| | |
| | |
| |
|
| | explicit TaskBox(
|
| | const QPixmap& icon,
|
| | const QString& title,
|
| | bool expandable = true,
|
| | QWidget* parent = nullptr
|
| | );
|
| | QSize minimumSizeHint() const override;
|
| |
|
| | ~TaskBox() override;
|
| | void hideGroupBox();
|
| | bool isGroupVisible() const;
|
| |
|
| | protected:
|
| | void showEvent(QShowEvent*) override;
|
| | void actionEvent(QActionEvent*) override;
|
| |
|
| | private:
|
| | bool wasShown;
|
| | };
|
| |
|
| | class GuiExport TaskPanel: public QSint::ActionPanel
|
| | {
|
| | Q_OBJECT
|
| |
|
| | public:
|
| | explicit TaskPanel(QWidget* parent = nullptr);
|
| | ~TaskPanel() override;
|
| | QSize minimumSizeHint() const override;
|
| | };
|
| |
|
| |
|
| | class GuiExport TaskWidget: public QWidget, public TaskContent
|
| | {
|
| | Q_OBJECT
|
| |
|
| | public:
|
| | explicit TaskWidget(QWidget* parent = nullptr);
|
| | ~TaskWidget() override;
|
| | };
|
| |
|
| | |
| | |
| | |
| | |
| |
|
| | class GuiExport TaskView: public QWidget, public Gui::SelectionSingleton::ObserverType
|
| | {
|
| | Q_OBJECT
|
| |
|
| | public:
|
| | explicit TaskView(QWidget* parent = nullptr);
|
| | ~TaskView() override;
|
| |
|
| |
|
| | void OnChange(
|
| | Gui::SelectionSingleton::SubjectType& rCaller,
|
| | Gui::SelectionSingleton::MessageType Reason
|
| | ) override;
|
| |
|
| | friend class Gui::DockWnd::ComboView;
|
| | friend class Gui::ControlSingleton;
|
| |
|
| | void addTaskWatcher(const std::vector<TaskWatcher*>& Watcher);
|
| | void clearTaskWatcher();
|
| | void takeTaskWatcher(TaskView* other);
|
| |
|
| | bool isEmpty(bool includeWatcher = true) const;
|
| |
|
| | void clearActionStyle();
|
| | void restoreActionStyle();
|
| |
|
| |
|
| | void addContextualPanel(QWidget* panel);
|
| | void removeContextualPanel(QWidget* panel);
|
| |
|
| | QSize minimumSizeHint() const override;
|
| |
|
| |
|
| | void setRestoreWidth(bool on);
|
| | bool shouldRestoreWidth() const;
|
| |
|
| | Q_SIGNALS:
|
| | void taskUpdate();
|
| |
|
| | protected Q_SLOTS:
|
| | void accept();
|
| | void reject();
|
| | void helpRequested();
|
| | void clicked(QAbstractButton* button);
|
| |
|
| | private:
|
| | void triggerMinimumSizeHint();
|
| | void adjustMinimumSizeHint();
|
| | void saveCurrentWidth();
|
| | void tryRestoreWidth();
|
| | void slotActiveDocument(const App::Document&);
|
| | void slotInEdit(const Gui::ViewProviderDocumentObject&);
|
| | void slotDeletedDocument(const App::Document&);
|
| | void slotViewClosed(const Gui::MDIView*);
|
| | void slotUndoDocument(const App::Document&);
|
| | void slotRedoDocument(const App::Document&);
|
| | void transactionChangeOnDocument(const App::Document&, bool undo);
|
| | QVBoxLayout* mainLayout;
|
| | QScrollArea* scrollArea;
|
| | QVBoxLayout* contextualPanelsLayout;
|
| | QVBoxLayout* dialogLayout;
|
| | QList<QWidget*> contextualPanels;
|
| |
|
| | protected:
|
| | void keyPressEvent(QKeyEvent* event) override;
|
| | bool event(QEvent* event) override;
|
| |
|
| | void addTaskWatcher();
|
| | void removeTaskWatcher();
|
| |
|
| | void updateWatcher();
|
| |
|
| | void showDialog(TaskDialog* dlg);
|
| |
|
| | void removeDialog();
|
| |
|
| | void setShowTaskWatcher(bool show);
|
| |
|
| | std::vector<TaskWatcher*> ActiveWatcher;
|
| |
|
| | QSint::ActionPanel* taskPanel;
|
| | TaskDialog* ActiveDialog;
|
| | TaskEditControl* ActiveCtrl;
|
| | bool restoreWidth = false;
|
| | int currentWidth = 0;
|
| | ParameterGrp::handle hGrp;
|
| | bool showTaskWatcher;
|
| |
|
| | Connection connectApplicationActiveDocument;
|
| | Connection connectApplicationDeleteDocument;
|
| | Connection connectApplicationClosedView;
|
| | Connection connectApplicationUndoDocument;
|
| | Connection connectApplicationRedoDocument;
|
| | Connection connectApplicationInEdit;
|
| | Connection connectShowTaskWatcherSetting;
|
| | };
|
| |
|
| | }
|
| | }
|
| |
|
| | #endif
|
| |
|