ToolBox::ToolBox(QWidget *parentWidget) : Utils::StyledBar(parentWidget), m_leftToolBar(new QToolBar("LeftSidebar", this)), m_rightToolBar(new QToolBar("RightSidebar", this)) { setMaximumHeight(44); setSingleRow(false); QFrame *frame = new QFrame(this); m_crumblePath = new Utils::CrumblePath(frame); frame->setStyleSheet("background-color: #4e4e4e;"); frame->setFrameShape(QFrame::NoFrame); QHBoxLayout *layout = new QHBoxLayout(frame); layout->setMargin(0); layout->setSpacing(0); frame->setLayout(layout); layout->addWidget(m_crumblePath); frame->setProperty("panelwidget", true); frame->setProperty("panelwidget_singlerow", false); QVBoxLayout *verticalLayout = new QVBoxLayout(this); verticalLayout->setMargin(0); verticalLayout->setSpacing(0); QHBoxLayout *horizontalLayout = new QHBoxLayout(); verticalLayout->addLayout(horizontalLayout); verticalLayout->addWidget(frame); horizontalLayout->setMargin(0); horizontalLayout->setSpacing(0); m_leftToolBar->setFloatable(true); m_leftToolBar->setMovable(true); m_leftToolBar->setOrientation(Qt::Horizontal); m_leftToolBar->setIconSize(QSize(24, 24)); QToolBar *stretchToolbar = new QToolBar(this); setSingleRow(false); m_leftToolBar->setProperty("panelwidget", true); m_leftToolBar->setProperty("panelwidget_singlerow", false); m_rightToolBar->setProperty("panelwidget", true); m_rightToolBar->setProperty("panelwidget_singlerow", false); stretchToolbar->setProperty("panelwidget", true); stretchToolbar->setProperty("panelwidget_singlerow", false); stretchToolbar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); m_rightToolBar->setOrientation(Qt::Horizontal); m_rightToolBar->setIconSize(QSize(24, 24)); horizontalLayout->addWidget(m_leftToolBar); horizontalLayout->addWidget(stretchToolbar); horizontalLayout->addWidget(m_rightToolBar); }
OsdWidget::OsdWidget(QWidget *parent) : StyledBar(parent), ui(new Ui::OsdWidget), _current(""), _file(new NetworkDownload()) { ui->setupUi(this); setLightColored(true); setSingleRow(false); setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); _info = new InfoBarWidget(this); ui->controls->addWidget(_info); ui->logo->hide(); ui->teletext->hide(); ui->buttonBack->setProperty("extraframe", true); ui->buttonMute->setProperty("extraframe", true); ui->buttonNext->setProperty("extraframe", true); ui->buttonPlay->setProperty("extraframe", true); ui->buttonRecordNow->setProperty("extraframe", true); ui->buttonSnapshot->setProperty("extraframe", true); ui->buttonStop->setProperty("extraframe", true); ui->buttonTeletext->setProperty("extraframe", true); connect(_info, SIGNAL(open(QString)), this, SIGNAL(openLink(QString))); connect(ui->teletext, SIGNAL(valueChanged(int)), this, SIGNAL(teletextPage(int))); connect(ui->buttonBack, SIGNAL(clicked()), this, SIGNAL(backClicked())); connect(ui->buttonMute, SIGNAL(clicked()), this, SIGNAL(muteClicked())); connect(ui->buttonNext, SIGNAL(clicked()), this, SIGNAL(nextClicked())); connect(ui->buttonPlay, SIGNAL(clicked()), this, SIGNAL(playClicked())); connect(ui->buttonRecordNow, SIGNAL(clicked()), this, SIGNAL(recordNowClicked())); connect(ui->buttonSnapshot, SIGNAL(clicked()), this, SIGNAL(snapshotClicked())); connect(ui->buttonStop, SIGNAL(clicked()), this, SIGNAL(stopClicked())); connect(ui->buttonTeletext, SIGNAL(clicked()), this, SIGNAL(teletextClicked())); connect(_file, SIGNAL(file(QFile *)), this, SLOT(setLogo(QFile *))); }