diff --git a/src/Gui/CombiView.h b/src/Gui/CombiView.h index 39db7938e803..69103e316b9b 100644 --- a/src/Gui/CombiView.h +++ b/src/Gui/CombiView.h @@ -78,6 +78,7 @@ class GuiExport CombiView : public Gui::DockWindow virtual ~CombiView(); Gui::TaskView::TaskView *getTaskPanel(void){return taskPanel;} + QTabWidget* getTabPanel() const { return tabs;} friend class Gui::ControlSingleton; diff --git a/src/Gui/Control.cpp b/src/Gui/Control.cpp index 5e4bf91e224a..4a8bebfb1122 100644 --- a/src/Gui/Control.cpp +++ b/src/Gui/Control.cpp @@ -136,6 +136,16 @@ void ControlSingleton::showDialog(Gui::TaskView::TaskDialog *dlg) } } +QTabWidget* ControlSingleton::tabPanel() const +{ + Gui::DockWnd::CombiView* pcCombiView = qobject_cast + (Gui::DockWindowManager::instance()->getDockWindow("Combo View")); + // should return the pointer to combo view + if (pcCombiView) + pcCombiView->getTabPanel(); + return 0; +} + Gui::TaskView::TaskDialog* ControlSingleton::activeDialog() const { return ActiveDialog; diff --git a/src/Gui/Control.h b/src/Gui/Control.h index d64bb2ceb003..a6ec1009966f 100644 --- a/src/Gui/Control.h +++ b/src/Gui/Control.h @@ -58,10 +58,10 @@ class GuiExport ControlSingleton : public QObject static void destruct (void); /** @name dialog handling - * this methods are used to control the TaskDialog stuff. + * These methods are used to control the TaskDialog stuff. */ //@{ - /// This method start an Task dialog in the TaskView + /// This method starts a task dialog in the task view void showDialog(Gui::TaskView::TaskDialog *dlg); Gui::TaskView::TaskDialog* activeDialog() const; //void closeDialog(); @@ -73,6 +73,8 @@ class GuiExport ControlSingleton : public QObject Gui::TaskView::TaskView* taskPanel() const; /// raising the model view void showModelView(); + /// get the tab panel + QTabWidget* tabPanel() const; //@} bool isAllowedAlterDocument(void) const; diff --git a/src/Gui/TaskView/TaskDialog.h b/src/Gui/TaskView/TaskDialog.h index 0a6321d931f2..367a175f0f1d 100644 --- a/src/Gui/TaskView/TaskDialog.h +++ b/src/Gui/TaskView/TaskDialog.h @@ -62,7 +62,7 @@ class GuiExport TaskDialog : public QObject const std::vector &getDialogContent(void) const; bool canClose() const; - /// tells the framework which buttons whisched for the dialog + /// tells the framework which buttons are wished for the dialog virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } virtual void modifyStandardButtons(QDialogButtonBox*)