SqpSidePane.cpp
54 lines
| 1.3 KiB
| text/x-c
|
CppLexer
r95 | #include "SidePane/SqpSidePane.h" | |||
r57 | #include "ui_SqpSidePane.h" | |||
#include <QAction> | ||||
#include <QLayout> | ||||
#include <QToolBar> | ||||
namespace { | ||||
static const QString SQPSIDEPANESTYLESHEET | ||||
= "QToolBar {" | ||||
" background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0," | ||||
" stop: 0.0 #5a5a5a," | ||||
" stop: 1.0 #414141);" | ||||
" border: none;" | ||||
" border-left: 1px solid #424242;" | ||||
"border-right: 1px solid #393939;" | ||||
" }" | ||||
" QToolButton {" | ||||
"background: none;" | ||||
"border: none;" | ||||
" }"; | ||||
} | ||||
r91 | SqpSidePane::SqpSidePane(QWidget *parent) : QWidget{parent}, ui{new Ui::SqpSidePane} | |||
r57 | { | |||
r101 | // QVBoxLayout *sidePaneLayout = new QVBoxLayout(this); | |||
// sidePaneLayout->setContentsMargins(0, 0, 0, 0); | ||||
// this->setLayout(sidePaneLayout); | ||||
r57 | ||||
ui->setupUi(this); | ||||
r101 | m_SidePaneToolbar = new QToolBar(); | |||
r57 | m_SidePaneToolbar->setOrientation(Qt::Vertical); | |||
r101 | this->layout()->addWidget(m_SidePaneToolbar); | |||
r57 | ||||
m_SidePaneToolbar->setStyleSheet(SQPSIDEPANESTYLESHEET); | ||||
r101 | ||||
this->setStyleSheet( | ||||
" QWidget {" | ||||
"background: red;" | ||||
"border: 1px;" | ||||
" }"); | ||||
r57 | } | |||
SqpSidePane::~SqpSidePane() | ||||
{ | ||||
delete ui; | ||||
} | ||||
QToolBar *SqpSidePane::sidePane() | ||||
{ | ||||
return m_SidePaneToolbar; | ||||
} | ||||