23 , mLayoutHorizontal( true )
26 mLayout =
new QBoxLayout( QBoxLayout::LeftToRight );
48 if ( mWidgetList.
count() > 0 )
52 line->
setFrameShape( mLayoutHorizontal ? QFrame::VLine : QFrame::HLine );
59 mWidgetList.
insert( widget, line );
65 void QgsUserInputDockWidget::widgetDestroyed(
QObject *obj )
71 while ( i != mWidgetList.
end() )
75 i.value()->deleteLater();
77 mWidgetList.
remove( i.key() );
83 void QgsUserInputDockWidget::areaChanged( Qt::DockWidgetArea area )
85 bool newLayoutHorizontal = area & Qt::BottomDockWidgetArea || area & Qt::TopDockWidgetArea;
86 if ( mLayoutHorizontal == newLayoutHorizontal )
92 mLayoutHorizontal = newLayoutHorizontal;
93 updateLayoutDirection();
96 void QgsUserInputDockWidget::floatingChanged(
bool floating )
98 if ( mLayoutHorizontal == floating )
104 updateLayoutDirection();
107 void QgsUserInputDockWidget::updateLayoutDirection()
109 mLayout->
setDirection( mLayoutHorizontal ? QBoxLayout::LeftToRight : QBoxLayout::TopToBottom );
112 while ( i != mWidgetList.
end() )
116 i.
value()->setFrameShape( mLayoutHorizontal ? QFrame::VLine : QFrame::HLine );
126 if ( mWidgetList.
count() == 0 )
void setColor(ColorGroup group, ColorRole role, const QColor &color)
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)