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 i = mWidgetList.
erase( i );
77 void QgsUserInputDockWidget::areaChanged( Qt::DockWidgetArea area )
79 bool newLayoutHorizontal = area & Qt::BottomDockWidgetArea || area & Qt::TopDockWidgetArea;
80 if ( mLayoutHorizontal == newLayoutHorizontal )
86 mLayoutHorizontal = newLayoutHorizontal;
87 updateLayoutDirection();
90 void QgsUserInputDockWidget::floatingChanged(
bool floating )
92 if ( mLayoutHorizontal == floating )
98 updateLayoutDirection();
101 void QgsUserInputDockWidget::updateLayoutDirection()
103 mLayout->
setDirection( mLayoutHorizontal ? QBoxLayout::LeftToRight : QBoxLayout::TopToBottom );
106 while ( i != mWidgetList.
constEnd() )
110 i.
value()->setFrameShape( mLayoutHorizontal ? QFrame::VLine : QFrame::HLine );
120 if ( mWidgetList.
count() == 0 )
iterator erase(iterator pos)
void setFrameShape(Shape)
const_iterator constBegin() const
const_iterator constEnd() const
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)