mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Merge branch 'bsongis/OP-1099_Hidden_icons_in_configuration_tab' into next
This commit is contained in:
commit
f36e3d66c1
@ -36,20 +36,20 @@ MyTabbedStackWidget::MyTabbedStackWidget(QWidget *parent, bool isVertical, bool
|
||||
m_vertical(isVertical),
|
||||
m_iconAbove(iconAbove)
|
||||
{
|
||||
m_listWidget = new QListWidget(this);
|
||||
m_listWidget = new QListWidget();
|
||||
m_stackWidget = new QStackedWidget();
|
||||
m_stackWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
|
||||
QBoxLayout *toplevelLayout;
|
||||
if (m_vertical) {
|
||||
toplevelLayout = new QHBoxLayout;
|
||||
toplevelLayout = new QHBoxLayout();
|
||||
toplevelLayout->addWidget(m_listWidget);
|
||||
toplevelLayout->addWidget(m_stackWidget);
|
||||
m_listWidget->setFlow(QListView::TopToBottom);
|
||||
m_listWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
|
||||
m_listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
} else {
|
||||
toplevelLayout = new QVBoxLayout;
|
||||
toplevelLayout = new QVBoxLayout();
|
||||
toplevelLayout->addWidget(m_stackWidget);
|
||||
toplevelLayout->addWidget(m_listWidget);
|
||||
m_listWidget->setFlow(QListView::LeftToRight);
|
||||
@ -59,6 +59,7 @@ MyTabbedStackWidget::MyTabbedStackWidget(QWidget *parent, bool isVertical, bool
|
||||
|
||||
if (m_iconAbove && m_vertical) {
|
||||
m_listWidget->setFixedWidth(80); // this should be computed instead
|
||||
m_listWidget->setWrapping(false);
|
||||
}
|
||||
|
||||
toplevelLayout->setSpacing(0);
|
||||
|
@ -51,10 +51,7 @@ public:
|
||||
int currentIndex() const;
|
||||
|
||||
void insertCornerWidget(int index, QWidget *widget);
|
||||
int cornerWidgetCount()
|
||||
{
|
||||
return m_cornerWidgetCount;
|
||||
}
|
||||
|
||||
QWidget *currentWidget()
|
||||
{
|
||||
return m_stackWidget->currentWidget();
|
||||
@ -77,10 +74,8 @@ private slots:
|
||||
private:
|
||||
QListWidget *m_listWidget;
|
||||
QStackedWidget *m_stackWidget;
|
||||
QWidget *m_selectionWidget;
|
||||
bool m_vertical;
|
||||
bool m_iconAbove;
|
||||
int m_cornerWidgetCount;
|
||||
};
|
||||
|
||||
#endif // MYTABBEDSTACKWIDGET_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user