23 , mLayoutHorizontal( true )
26 mLayout =
new QBoxLayout( QBoxLayout::LeftToRight );
43 if ( mWidgetList.
count() > 0 )
47 line->
setFrameShape( mLayoutHorizontal ? QFrame::VLine : QFrame::HLine );
54 mWidgetList.
insert( widget, line );
60 void QgsUserInputDockWidget::widgetDestroyed(
QObject *obj )
66 while ( i != mWidgetList.
end() )
70 i.value()->deleteLater();
72 mWidgetList.
remove( i.key() );
78 void QgsUserInputDockWidget::areaChanged( Qt::DockWidgetArea area )
80 bool newLayoutHorizontal = area & Qt::BottomDockWidgetArea || area & Qt::TopDockWidgetArea;
81 if ( mLayoutHorizontal == newLayoutHorizontal )
87 mLayoutHorizontal = newLayoutHorizontal;
88 updateLayoutDirection();
91 void QgsUserInputDockWidget::floatingChanged(
bool floating )
93 if ( mLayoutHorizontal == floating )
99 updateLayoutDirection();
102 void QgsUserInputDockWidget::updateLayoutDirection()
104 mLayout->
setDirection( mLayoutHorizontal ? QBoxLayout::LeftToRight : QBoxLayout::TopToBottom );
107 while ( i != mWidgetList.
end() )
111 i.
value()->setFrameShape( mLayoutHorizontal ? QFrame::VLine : QFrame::HLine );
121 if ( mWidgetList.
count() == 0 )
void setFrameShape(Shape)
void setFrameShadow(Shadow)
bool setAlignment(QWidget *w, QFlags< Qt::AlignmentFlag > alignment)
void setDirection(Direction direction)
iterator insert(const Key &key, const T &value)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int count(const Key &key) const
iterator find(const Key &key)
void destroyed(QObject *obj)
const T value(const Key &key) const
int remove(const Key &key)