Skip to content

Commit

Permalink
+ Allow access to tab panel of combo view, fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 5, 2014
1 parent 33e6c39 commit 27315d4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Gui/CombiView.h
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions src/Gui/Control.cpp
Expand Up @@ -136,6 +136,16 @@ void ControlSingleton::showDialog(Gui::TaskView::TaskDialog *dlg)
}
}

QTabWidget* ControlSingleton::tabPanel() const
{
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
(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;
Expand Down
6 changes: 4 additions & 2 deletions src/Gui/Control.h
Expand Up @@ -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();
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/TaskView/TaskDialog.h
Expand Up @@ -62,7 +62,7 @@ class GuiExport TaskDialog : public QObject
const std::vector<QWidget*> &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*)
Expand Down

0 comments on commit 27315d4

Please sign in to comment.