FACT++  1.0
DockWindow::DockWindow ( QDockWidget *  d,
const QString &  name 
)

Definition at line 17 of file DockWindow.cc.

References fDockWidget, and fTabWidget.

18  : fDockWidget(d)
19 {
20  QObject *w0 = d->parent(); // QWidget
21  if (!w0)
22  throw runtime_error("1st parent of QDockWidget is NULL");
23 
24  QObject *w1 = w0->parent(); // QWidget
25  if (!w1)
26  throw runtime_error("2nd parent of QDockWidget is NULL");
27 
28  QObject *w2 = w1->parent(); // QWidget
29  if (!w2)
30  throw runtime_error("3rd parent of QDockWidget is NULL");
31 
32  fTabWidget = dynamic_cast<QTabWidget*>(w2);
33  if (!fTabWidget)
34  throw runtime_error("3rd parent of QDockWidget is not a QTabWidget");
35 
36  setGeometry(d->geometry());
37  addDockWidget(Qt::LeftDockWidgetArea, fDockWidget);
38  setWindowTitle(name);
39 
40  // FIXME: ToolTip, WhatsThis
41 
42  show();
43 }
QTabWidget * fTabWidget
Definition: DockWindow.h:15
QDockWidget * fDockWidget
Definition: DockWindow.h:12