123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- #include "browserbuttons.h"
- BrowserButtons::BrowserButtons(QWidget *parent) :
- QToolBar(parent)
- {
-
- setMinimumHeight(48);
- setMaximumHeight(48);
-
-
- tbPrev=new QToolButton();
- tbPrev->setDisabled(true);
-
- tbUp=new QToolButton();
-
- tbNext=new QToolButton();
- tbNext->setDisabled(true);
-
- tbHome=new QToolButton();
-
- tbView=new QToolButton();
-
- tbFull=new QToolButton();
- tbFull->setCheckable(true);
- addWidget(tbPrev);
- addWidget(tbUp);
- addWidget(tbNext);
- addWidget(tbHome);
-
- }
- void BrowserButtons::setMobileGUI(){
-
- tbPrev->setIcon(QIcon(":/icons48/prev"));
- tbPrev->setIconSize(QSize(48,48));
- tbUp->setIcon(QIcon(":/icons48/up"));
- tbUp->setIconSize(QSize(48,48));
- tbNext->setIcon(QIcon(":/icons48/next"));
- tbNext->setIconSize(QSize(48,48));
- tbHome->setIcon(QIcon(":/icons48/home"));
- tbHome->setIconSize(QSize(48,48));
- tbView->setIcon(QIcon(":/icons48/icon-view"));
- tbView->setIconSize(QSize(48,48));
- tbFull->setIcon(QIcon(":/icons48/fullscreen"));
- tbFull->setIconSize(QSize(48,48));
-
- tbPrev->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
- tbUp->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
- tbNext->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
- tbHome->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
- }
- void BrowserButtons::setDesktopGUI(){
-
- addSeparator();
-
- addWidget(tbView);
-
- tbPrev->setIcon(QIcon(":/icons32/prev"));
- tbPrev->setIconSize(QSize(32,32));
- tbUp->setIcon(QIcon(":/icons32/up"));
- tbUp->setIconSize(QSize(32,32));
- tbNext->setIcon(QIcon(":/icons32/next"));
- tbNext->setIconSize(QSize(32,32));
- tbHome->setIcon(QIcon(":/icons32/home"));
- tbHome->setIconSize(QSize(32,32));
- tbView->setIcon(QIcon(":/icons32/icon-view"));
- tbView->setIconSize(QSize(32,32));
- tbFull->setIcon(QIcon(":/icons32/fullscreen"));
- tbFull->setIconSize(QSize(32,32));
-
- tbPrev->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
- tbUp->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
- tbNext->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
- tbHome->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
- tbView->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
- tbFull->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
- tbPrev->setText(tr("Back"));
- tbUp->setText(tr("Up"));
- tbNext->setText(tr("Next"));
- tbHome->setText(tr("Home"));
- tbView->setText(tr("View"));
- tbFull->setText(tr("Maximmize"));
-
- tbExit=new QToolButton();
- tbExit->setIcon(QIcon(":/icons32/exit"));
- tbExit->setIconSize(QSize(32,32));
-
- }
|