+ Allow access to tab panel of combo view, fix some typos

This commit is contained in:
wmayer 2014-01-05 11:32:18 +01:00
parent 33e6c39f8a
commit 27315d4c1e
4 changed files with 16 additions and 3 deletions

View File

@ -78,6 +78,7 @@ public:
virtual ~CombiView(); virtual ~CombiView();
Gui::TaskView::TaskView *getTaskPanel(void){return taskPanel;} Gui::TaskView::TaskView *getTaskPanel(void){return taskPanel;}
QTabWidget* getTabPanel() const { return tabs;}
friend class Gui::ControlSingleton; friend class Gui::ControlSingleton;

View File

@ -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 Gui::TaskView::TaskDialog* ControlSingleton::activeDialog() const
{ {
return ActiveDialog; return ActiveDialog;

View File

@ -58,10 +58,10 @@ public:
static void destruct (void); static void destruct (void);
/** @name dialog handling /** @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); void showDialog(Gui::TaskView::TaskDialog *dlg);
Gui::TaskView::TaskDialog* activeDialog() const; Gui::TaskView::TaskDialog* activeDialog() const;
//void closeDialog(); //void closeDialog();
@ -73,6 +73,8 @@ public:
Gui::TaskView::TaskView* taskPanel() const; Gui::TaskView::TaskView* taskPanel() const;
/// raising the model view /// raising the model view
void showModelView(); void showModelView();
/// get the tab panel
QTabWidget* tabPanel() const;
//@} //@}
bool isAllowedAlterDocument(void) const; bool isAllowedAlterDocument(void) const;

View File

@ -62,7 +62,7 @@ public:
const std::vector<QWidget*> &getDialogContent(void) const; const std::vector<QWidget*> &getDialogContent(void) const;
bool canClose() 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 virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const
{ return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; }
virtual void modifyStandardButtons(QDialogButtonBox*) virtual void modifyStandardButtons(QDialogButtonBox*)