Skip to content

Commit

Permalink
All Tabs (dummy)
Browse files Browse the repository at this point in the history
  • Loading branch information
BourgeoisLab committed Mar 2, 2024
1 parent 2880080 commit 22a5922
Show file tree
Hide file tree
Showing 20 changed files with 369 additions and 30 deletions.
133 changes: 131 additions & 2 deletions kleiner-brauhelfer/data/Styles/style_light.qss
Original file line number Diff line number Diff line change
@@ -1,3 +1,125 @@
QGroupBox {
background-color: #f9f9f9;
border: 1px solid #ababab;
border-radius: 4px;
margin-top: 0.5em;
}

QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top left;
left: 1em;
background-color: #f9f9f9;
}

QToolBox::tab {
background-color: #d5d5d5;
color: #444444;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
font-weight: bold;
font-size: 10pt;
}

QToolBox::tab:selected {
background-color: #44ffc400;
}

QToolBox::tab:hover {
background-color: #22ffc400;
}

QTextEdit#tbHelp {
background-color: #ffffdc;
color: #000000;
}

QTabBar::tab {
color: #444444;
border: 0;
font-weight: bold;
font-size: 10pt;
}

QTabBar::tab:bottom, QTabBar::tab:top {
margin: 0 4px;
padding: 0 4px;
height: 30px;
}

QTabBar::tab:left, QTabBar::tab:right {
margin: 4px 0;
padding: 4px 0;
width: 30px;
}

QTabBar::tab:left:selected {
color: #ffc400;
}

QTabBar::tab:top:selected, QTabBar::tab:top:hover {
color: #ffc400;
border-bottom: 2px solid #ffc400;
}

QTabBar::tab:left:selected, QTabBar::tab:left:hover {
color: #ffc400;
border-right: 2px solid #ffc400;
}

QTableView, QTreeView, QListView, QScrollArea, QTextEdit, QPlainTextEdit {
border: 1px solid #ababab;
background-color: #fcfcfc;
}

QScrollArea {
border: none;
}

QScrollArea#scrollAreaAnlagen, QWidget#scrollAreaAnlagenWidgetContents,
QScrollArea#scrollAreaEinstellungen, QWidget#scrollAreaEinstellungenWidgetContents,
QScrollArea#scrollAreaBewertungen, QWidget#scrollAreaBewertungenWidgetContents {
background-color: #fcfcfc;
}

QScrollBar {
background-color: #f9f9f9;
border: 1px solid #ababab;
border-radius: 4px;
padding: 1px;
}

QScrollBar:vertical {
width: 16px;
margin-left: 6px;
}

QScrollBar:horizontal {
height: 16px;
margin-top: 6px;
}

QScrollBar::handle {
border-radius: 2px;
background: #d5d5d5;
min-width: 16px;
min-height: 16px;
}

QScrollBar::handle:active {
background: #ffc400;
}

QScrollBar::add-line, QScrollBar::sub-line,
QScrollBar::add-page, QScrollBar::sub-page {
width: 0px;
background: transparent;
}

QScrollArea::corner {
background: transparent;
}

QPushButton[Category="Malz"], .QFrame[Category="Malz"], QTableView[Category="Malz"] QHeaderView::section {
background-color: rgb(252,247,224);
}
Expand Down Expand Up @@ -30,14 +152,21 @@ QPushButton[Category="Kommentar"], .QFrame[Category="Kommentar"], QTableView[Cat
background-color: rgb(249,249,249);
}

QLineEdit[ErrorState="true"], QPushButton[ErrorState="true"], QAbstractSpinBox[ErrorState="true"], QComboBox[ErrorState="true"] {
QLineEdit[ErrorState="true"],
QPushButton[ErrorState="true"],
QAbstractSpinBox[ErrorState="true"],
QComboBox[ErrorState="true"] {
background-color: rgb(252,171,171);
}

QLabel[ErrorState="true"], QCheckBox[ErrorState="true"] {
color: rgb(180,10,10);
}

QLineEdit[ValueChanged="true"], QPushButton[ValueChanged="true"], QAbstractSpinBox[ValueChanged="true"], QComboBox[ValueChanged="true"], QCheckBox[ValueChanged="true"] {
QLineEdit[ValueChanged="true"],
QPushButton[ValueChanged="true"],
QAbstractSpinBox[ValueChanged="true"],
QComboBox[ValueChanged="true"],
QCheckBox[ValueChanged="true"] {
background-color: rgb(255,240,175);
}
2 changes: 1 addition & 1 deletion kleiner-brauhelfer/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<file>images/icons/light/index.theme</file>
<file>images/icons/light/light.svg</file>
<file>images/icons/light/svg/about.svg</file>
<file>images/icons/light/svg/anlagen.svg</file>
<file>images/icons/light/svg/ausruestung.svg</file>
<file>images/icons/light/svg/bewertungen.svg</file>
<file>images/icons/light/svg/brauuebersicht.svg</file>
<file>images/icons/light/svg/database.svg</file>
Expand Down
9 changes: 9 additions & 0 deletions kleiner-brauhelfer/kleiner-brauhelfer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,19 @@ SOURCES += \
settings.cpp \
tababstract.cpp \
tababfuellen.cpp \
tabausruestung.cpp \
tabbewertung.cpp \
tabbewertungen.cpp \
tabbraudaten.cpp \
tabbrauuebersicht.cpp \
tabeinstellungen.cpp \
tabetikette.cpp \
tabgaerverlauf.cpp \
tablager.cpp \
tabrezept.cpp \
tabsudauswahl.cpp \
tabsudauswahl_sudinfo.cpp \
tabsude.cpp \
tabueber.cpp \
tabzusammenfassung.cpp \
templatetags.cpp \
Expand Down Expand Up @@ -149,15 +152,18 @@ HEADERS += \
settings.h \
tababstract.h \
tababfuellen.h \
tabausruestung.h \
tabbewertung.h \
tabbewertungen.h \
tabbraudaten.h \
tabbrauuebersicht.h \
tabeinstellungen.h \
tabetikette.h \
tabgaerverlauf.h \
tablager.h \
tabrezept.h \
tabsudauswahl.h \
tabsude.h \
tabueber.h \
tabzusammenfassung.h \
templatetags.h \
Expand Down Expand Up @@ -251,15 +257,18 @@ FORMS += \
mainwindow.ui \
mainwindow2.ui \
tababfuellen.ui \
tabausruestung.ui \
tabbewertung.ui \
tabbewertungen.ui \
tabbraudaten.ui \
tabbrauuebersicht.ui \
tabeinstellungen.ui \
tabetikette.ui \
tabgaerverlauf.ui \
tablager.ui \
tabrezept.ui \
tabsudauswahl.ui \
tabsude.ui \
tabueber.ui \
tabzusammenfassung.ui \
dialogs/dlgausruestung.ui \
Expand Down
7 changes: 4 additions & 3 deletions kleiner-brauhelfer/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ MainWindow::MainWindow(QWidget *parent) :

connect(bh, &Brauhelfer::modified, this, &MainWindow::databaseModified);

ui->actionShowTabBarLabels->setChecked(true);
ui->splitterHelp->setSizes({900, 100});
ui->splitterHelp->setStretchFactor(0, 1);
ui->splitterHelp->setStretchFactor(1, 0);
Expand All @@ -97,6 +96,8 @@ MainWindow::MainWindow(QWidget *parent) :
ui->splitterHelp->restoreState(gSettings->value("splitterHelpState").toByteArray());
gSettings->endGroup();

on_actionShowTabBarLabels_toggled(ui->actionShowTabBarLabels->isChecked());

databaseModified();
WidgetDecorator::clearValueChanged();

Expand Down Expand Up @@ -524,7 +525,7 @@ void MainWindow::on_tabWidget_currentChanged(int tab)
ui->toolBarUndo->setVisible(gUndoStack->isEnabled() && (tab == Tab::Sude || tab == Tab::Lager || tab == Tab::Anlagen || tab == Tab::Bewertungen));
ui->toolBarSudauswahl->setVisible(tab == Tab::Sudauswahl);
ui->toolBarLager->setVisible(tab == Tab::Lager);
ui->toolBarAnlagen->setVisible(tab == Tab::Anlagen);
ui->toolBarAusruestung->setVisible(tab == Tab::Anlagen);
ui->toolBarBewertungen->setVisible(tab == Tab::Bewertungen);
}

Expand All @@ -535,7 +536,7 @@ void MainWindow::on_actionShowTabBarLabels_toggled(bool showLabels)
ui->tabWidget->setTabText(Tab::Sudauswahl, ui->tabSudauswahl->windowTitle());
ui->tabWidget->setTabText(Tab::Sude, ui->tabSude->windowTitle());
ui->tabWidget->setTabText(Tab::Lager, ui->tabLager->windowTitle());
ui->tabWidget->setTabText(Tab::Anlagen, ui->tabAnlagen->windowTitle());
ui->tabWidget->setTabText(Tab::Anlagen, ui->tabAusruestung->windowTitle());
ui->tabWidget->setTabText(Tab::Brauubersicht, ui->tabBrauuebersicht->windowTitle());
ui->tabWidget->setTabText(Tab::Bewertungen, ui->tabBewertungen->windowTitle());
ui->tabWidget->setTabText(Tab::Einstellungen, ui->tabEinstellungen->windowTitle());
Expand Down
55 changes: 39 additions & 16 deletions kleiner-brauhelfer/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ QTabBar::tab:top:selected, QTabBar::tab:top:hover {
border-bottom: 2px solid #ffc400;
}

QTabBar::tab:left:selected, QTabBar::tab:left:hover {
color: #ffc400;
border-right: 2px solid #ffc400;
}

QTableView, QTreeView, QListView, QScrollArea, QTextEdit, QPlainTextEdit {
border: 1px solid #ababab;
background-color: #fcfcfc;
Expand Down Expand Up @@ -192,42 +197,42 @@ QCheckBox[ValueChanged=&quot;true&quot;] {
<enum>QTabWidget::West</enum>
</property>
<property name="currentIndex">
<number>5</number>
<number>0</number>
</property>
<widget class="TabSudAuswahl" name="tabSudauswahl">
<attribute name="icon">
<iconset theme="sudauswahl" resource="images.qrc">
<normaloff>:/images/icons/light/svg/sudauswahl.svg</normaloff>:/images/icons/light/svg/sudauswahl.svg</iconset>
</attribute>
<attribute name="title">
<string>Sudauswahl</string>
<string notr="true">Sudauswahl</string>
</attribute>
</widget>
<widget class="QWidget" name="tabSude">
<widget class="TabSude" name="tabSude">
<attribute name="icon">
<iconset theme="sude" resource="images.qrc">
<normaloff>:/images/icons/light/svg/sude.svg</normaloff>:/images/icons/light/svg/sude.svg</iconset>
</attribute>
<attribute name="title">
<string>Sude</string>
<string notr="true">Sude</string>
</attribute>
</widget>
<widget class="QWidget" name="tabLager">
<widget class="TabLager" name="tabLager">
<attribute name="icon">
<iconset theme="lager" resource="images.qrc">
<normaloff>:/images/icons/light/svg/lager.svg</normaloff>:/images/icons/light/svg/lager.svg</iconset>
</attribute>
<attribute name="title">
<string>Lager</string>
<string notr="true">Lager</string>
</attribute>
</widget>
<widget class="QWidget" name="tabAnlagen">
<widget class="TabAusruestung" name="tabAusruestung">
<attribute name="icon">
<iconset theme="anlagen" resource="images.qrc">
<normaloff>:/images/icons/light/svg/anlagen.svg</normaloff>:/images/icons/light/svg/anlagen.svg</iconset>
<iconset theme="ausruestung" resource="images.qrc">
<normaloff>:/images/icons/light/svg/ausruestung.svg</normaloff>:/images/icons/light/svg/ausruestung.svg</iconset>
</attribute>
<attribute name="title">
<string>Anlagen</string>
<string notr="true">Ausrüstung</string>
</attribute>
</widget>
<widget class="TabBrauuebersicht" name="tabBrauuebersicht">
Expand All @@ -236,7 +241,7 @@ QCheckBox[ValueChanged=&quot;true&quot;] {
<normaloff>:/images/icons/light/svg/brauuebersicht.svg</normaloff>:/images/icons/light/svg/brauuebersicht.svg</iconset>
</attribute>
<attribute name="title">
<string>Brauübersicht</string>
<string notr="true">Brauübersicht</string>
</attribute>
</widget>
<widget class="TabBewertungen" name="tabBewertungen">
Expand All @@ -245,7 +250,7 @@ QCheckBox[ValueChanged=&quot;true&quot;] {
<normaloff>:/images/icons/light/svg/bewertungen.svg</normaloff>:/images/icons/light/svg/bewertungen.svg</iconset>
</attribute>
<attribute name="title">
<string>Bewertungen</string>
<string notr="true">Bewertungen</string>
</attribute>
</widget>
<widget class="TabEinstellungen" name="tabEinstellungen">
Expand All @@ -254,7 +259,7 @@ QCheckBox[ValueChanged=&quot;true&quot;] {
<normaloff>:/images/icons/light/svg/settings.svg</normaloff>:/images/icons/light/svg/settings.svg</iconset>
</attribute>
<attribute name="title">
<string>Einstellungen</string>
<string notr="true">Einstellungen</string>
</attribute>
</widget>
<widget class="TabUeber" name="tabUeber">
Expand All @@ -263,7 +268,7 @@ QCheckBox[ValueChanged=&quot;true&quot;] {
<normaloff>:/images/icons/light/svg/about.svg</normaloff>:/images/icons/light/svg/about.svg</iconset>
</attribute>
<attribute name="title">
<string>Über</string>
<string notr="true">Über</string>
</attribute>
</widget>
</widget>
Expand Down Expand Up @@ -380,7 +385,7 @@ QCheckBox[ValueChanged=&quot;true&quot;] {
<bool>false</bool>
</attribute>
</widget>
<widget class="QToolBar" name="toolBarAnlagen">
<widget class="QToolBar" name="toolBarAusruestung">
<property name="contextMenuPolicy">
<enum>Qt::PreventContextMenu</enum>
</property>
Expand Down Expand Up @@ -426,7 +431,7 @@ QCheckBox[ValueChanged=&quot;true&quot;] {
<bool>false</bool>
</attribute>
</widget>
<widget class="QToolBar" name="toolBarRight">
<widget class="QToolBar" name="toolBarHelp">
<property name="contextMenuPolicy">
<enum>Qt::PreventContextMenu</enum>
</property>
Expand Down Expand Up @@ -718,6 +723,24 @@ QCheckBox[ValueChanged=&quot;true&quot;] {
<header>tabbewertungen.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>TabAusruestung</class>
<extends>QWidget</extends>
<header>tabausruestung.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>TabLager</class>
<extends>QWidget</extends>
<header>tablager.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>TabSude</class>
<extends>QWidget</extends>
<header>tabsude.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="images.qrc"/>
Expand Down
Loading

0 comments on commit 22a5922

Please sign in to comment.