28 #include <QApplication>
29 #include <QListWidgetItem>
30 #include <QScrollArea>
31 #include <QVBoxLayout>
32 #include <QWidgetAction>
33 #include <QtCore/QList>
35 #include "../WMainWindow.h"
36 #include "../WQtGui.h"
37 #include "../guiElements/WScaleLabel.h"
38 #include "WQtRoiHeaderTreeItem.h"
39 #include "WQtRoiTreeItem.h"
40 #include "WTreeItemTypes.h"
45 setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
50 QHBoxLayout* containerLayout =
new QHBoxLayout();
55 QHBoxLayout* labelContainerLayout =
new QHBoxLayout();
56 labelContainer->setLayout( labelContainerLayout );
59 l->setTextInteractionFlags( Qt::NoTextInteraction );
60 l->setToolTip(
"Define a selection of fibers using ROIs which are interpreted as logical formula." );
61 labelContainerLayout->addWidget( l );
65 QColor defaultCol = palette.window().color();
68 QColor labelCol = defaultCol.darker( 120 );
70 l->setStyleSheet(
"background-color:" + labelCol.name() +
";" );
71 labelContainer->setStyleSheet(
"background-color:" + labelCol.name() +
";" );
74 containerLayout->addWidget( labelContainer );
75 labelContainerLayout->setContentsMargins( 5, 2, 0, 2 );
76 labelContainerLayout->setSpacing( 0 );
79 containerLayout->setContentsMargins( 0, 2, 0, 2 );
80 containerLayout->setSpacing( 0 );
83 containerLayout->setStretchFactor( labelContainer, 100 );
86 m_itemWidget->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
This class represents a ROI branch in the tree widget.
Special Label that can shrink and expand in a layout.