Implements tab-movement, changing the order of tabs by dragging with mouse.

This commit is contained in:
mfreiholz
2016-02-02 08:24:12 +01:00
parent 863d3233ad
commit bc14d9255f
5 changed files with 118 additions and 31 deletions

View File

@@ -39,27 +39,27 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(ads);
// Development style.
// a.setStyleSheet(""
// " QSplitter::handle { border: 1px solid #000000; background: #000000; } "
// " ads--ContainerWidget { border: 1px solid #ff0000; background: #FFE6E6; } "
// " ads--SectionWidget { border: 1px solid #00ff00; background: #E6FFE6; } "
// " ads--SectionTitleWidget { border: 1px solid #0000ff; background: #E6E6FF; } "
// " ads--SectionTitleWidget[activeTab=\"true\"] { border: 1px solid #0000ff; background: #9696FF; } "
// " ads--SectionContentWidget { border: 1px solid #FFFF00; background: #FFFFE6; } "
// );
a.setStyleSheet(""
" QSplitter::handle { border: 1px solid #000000; background: #000000; } "
" ads--ContainerWidget { border: 1px solid #ff0000; background: #FFE6E6; padding: 6px; } "
" ads--SectionWidget { border: 1px solid #00ff00; background: #E6FFE6; padding: 6px; } "
" ads--SectionTitleWidget { border: 1px solid #0000ff; background: #E6E6FF; padding: 6px; } "
" ads--SectionTitleWidget[activeTab=\"true\"] { border: 1px solid #0000ff; background: #9696FF; padding: 6px; } "
" ads--SectionContentWidget { border: 1px solid #FFFF00; background: #FFFFE6; padding: 6px; } "
);
// PARTsolutions style.
a.setStyleSheet(""
" QSplitter::handle:vertical { image: url(:/img/splitter-horizontal.png); } "
" QSplitter::handle:horizontal { image: url(:/img/splitter-vertical.png); } "
" ads--ContainerWidget { border: 0; background: #9ab6ca; } "
" ads--SectionWidget { border-width: 1px; border-color: #ffffff; border-style: solid; background: #7c9eb3; padding: 0; margin: 0; } "
" ads--SectionTitleWidget { border-right: 1px solid #E7F3F8; background: #7c9eb3; } "
" ads--SectionTitleWidget[activeTab=\"true\"] { border: 1px solid #E7F3F8; background: #E7F3F8; } "
" ads--SectionTitleWidget IconTitleWidget QLabel { color: #000000; } "
" ads--SectionContentWidget { border: 0px solid #E7F3F8; background: #ffffff; } "
" ads--FloatingWidget QPushButton { background: #E7F3F8; } "
);
// a.setStyleSheet(""
// " QSplitter::handle:vertical { image: url(:/img/splitter-horizontal.png); } "
// " QSplitter::handle:horizontal { image: url(:/img/splitter-vertical.png); } "
// " ads--ContainerWidget { border: 0; background: #9ab6ca; } "
// " ads--SectionWidget { border-width: 1px; border-color: #ffffff; border-style: solid; background: #7c9eb3; padding: 0; margin: 0; } "
// " ads--SectionTitleWidget { border-right: 1px solid #E7F3F8; background: #7c9eb3; } "
// " ads--SectionTitleWidget[activeTab=\"true\"] { border: 1px solid #E7F3F8; background: #E7F3F8; } "
// " ads--SectionTitleWidget IconTitleWidget QLabel { color: #000000; } "
// " ads--SectionContentWidget { border: 0px solid #E7F3F8; background: #ffffff; } "
// " ads--FloatingWidget QPushButton { background: #E7F3F8; } "
// );
MainWindow mw;
resizeWidgetPerCent(&mw, 60, 80);