当前位置: 首页>>代码示例>>C++>>正文


C++ QToolBar::setOrientation方法代码示例

本文整理汇总了C++中QToolBar::setOrientation方法的典型用法代码示例。如果您正苦于以下问题:C++ QToolBar::setOrientation方法的具体用法?C++ QToolBar::setOrientation怎么用?C++ QToolBar::setOrientation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QToolBar的用法示例。


在下文中一共展示了QToolBar::setOrientation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QLabel

void BitcoinGUI::createToolBars2()
{
    QLabel *mylabel = new QLabel (this);
   mylabel->setPixmap(QPixmap(":images/head"));
   mylabel->show();

    QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
    toolbar->setObjectName("toolbar");
    addToolBar(Qt::LeftToolBarArea,toolbar);
    toolbar->setOrientation(Qt::Vertical);
    toolbar->setMovable( false );
    toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
    toolbar->setIconSize(QSize(50,25));
    toolbar->addWidget(mylabel);
    toolbar->addAction(overviewAction);
    toolbar->addAction(sendCoinsAction);
    toolbar->addAction(receiveCoinsAction);
    toolbar->addAction(historyAction);
    toolbar->addAction(addressBookAction);
    toolbar->addAction(blockAction);
    toolbar->addAction(statisticsAction);
    toolbar->addAction(optionsAction);

    QWidget* spacer = new QWidget();
    spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    toolbar->addWidget(spacer);
    spacer->setObjectName("spacer");
    toolbar->setStyleSheet(
    "#toolbar { font-weight:600;border:none;height:100%;padding-top:20px; background: rgb(37,40,46); text-align: left; color: white;min-width:180px;max-width:180px;}"
    "QToolBar QToolButton:hover {background:rgb(28,29,33);}"
    "QToolBar QToolButton:checked {background:rgba(28,29,33,100);}"
    "QToolBar QToolButton { font-weight:600;font-size:10px;font-family:'Century Gothic';padding-left:20px;padding-right:181px;padding-top:5px;padding-bottom:5px; width:100%; color: white; text-align: left; background:transparent;text-transform:uppercase; }");

    wId = new QWidget(this);
    wId3 = new QWidget(this);
    QToolBar *toolbars = addToolBar(tr("Settings2"));
    addToolBar(Qt::RightToolBarArea,toolbars);
    toolbars->setOrientation(Qt::Horizontal);
    toolbars->setMovable( false );
    toolbars->setStyleSheet("QToolBar QToolButton {border:0px;margin-right:3px} QToolBar{ border:0px; }");
    toolbars->setIconSize(QSize(102,25));
    QHBoxLayout *vbox5 = new QHBoxLayout();
    vbox5->addWidget(toolbars);
    vbox5->setContentsMargins(0,0,0,0);
    wId3->setFixedSize(250,30);
    wId3->move(260,10);
    wId3->setLayout(vbox5);
    wId3->setFocus();
    wId3->raise();
    QMenu *menu = new QMenu(tr("Mini"));
    menu->setStyleSheet("border:none;background:none;");
    menu->addAction(toggleHideAction);
    menu->menuAction()->setIcon(QIcon(":/icons/mini"));
    QHBoxLayout *vbox3 = new QHBoxLayout();
    vbox3->setContentsMargins(0,0,0,0);
    wId->setFixedSize(120,40);
    wId->move(915,1);
    wId->setLayout(vbox3);
    wId->setFocus();
}
开发者ID:roscoin1,项目名称:roscoin,代码行数:60,代码来源:bitcoingui.cpp

示例2: orientation

void tst_QToolBar::orientation()
{
    QToolBar tb;
    QCOMPARE(tb.orientation(), Qt::Horizontal);

    QSignalSpy spy(&tb, SIGNAL(orientationChanged(Qt::Orientation)));

    tb.setOrientation(Qt::Vertical);
    QCOMPARE(tb.orientation(), Qt::Vertical);
    QCOMPARE(spy.count(), 1);
    QCOMPARE(*static_cast<const Qt::Orientation *>(spy.at(0).value(0).constData()),
             tb.orientation());
    spy.clear();
    tb.setOrientation(tb.orientation());
    QCOMPARE(spy.count(), 0);

    tb.setOrientation(Qt::Horizontal);
    QCOMPARE(tb.orientation(), Qt::Horizontal);
    QCOMPARE(spy.count(), 1);
    QCOMPARE(*static_cast<const Qt::Orientation *>(spy.at(0).value(0).constData()),
             tb.orientation());
    spy.clear();
    tb.setOrientation(tb.orientation());
    QCOMPARE(spy.count(), 0);

    tb.setOrientation(Qt::Vertical);
    QCOMPARE(tb.orientation(), Qt::Vertical);
    QCOMPARE(spy.count(), 1);
    QCOMPARE(*static_cast<const Qt::Orientation *>(spy.at(0).value(0).constData()),
             tb.orientation());
    spy.clear();
    tb.setOrientation(tb.orientation());
    QCOMPARE(spy.count(), 0);

    tb.setOrientation(Qt::Horizontal);
    QCOMPARE(tb.orientation(), Qt::Horizontal);
    QCOMPARE(spy.count(), 1);
    QCOMPARE(*static_cast<const Qt::Orientation *>(spy.at(0).value(0).constData()),
             tb.orientation());
    spy.clear();
    tb.setOrientation(tb.orientation());
    QCOMPARE(spy.count(), 0);

    tb.setOrientation(Qt::Vertical);
    QCOMPARE(tb.orientation(), Qt::Vertical);
    QCOMPARE(spy.count(), 1);
    QCOMPARE(*static_cast<const Qt::Orientation *>(spy.at(0).value(0).constData()),
             tb.orientation());
    spy.clear();
    tb.setOrientation(tb.orientation());
    QCOMPARE(spy.count(), 0);
}
开发者ID:PNIDigitalMedia,项目名称:emscripten-qt,代码行数:52,代码来源:tst_qtoolbar.cpp

示例3: createToolBars

void BitcoinGUI::createToolBars()
{
    QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
    toolbar->setObjectName("toolbar");
    addToolBar(Qt::LeftToolBarArea,toolbar);
    toolbar->setOrientation(Qt::Vertical);
    toolbar->setFixedWidth(205);
    toolbar->setMovable( false );
    toolbar->setToolButtonStyle(Qt::ToolButtonTextOnly);

    QLabel* header = new QLabel();
    header->setMinimumSize(156,156);
    header->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    header->setPixmap(QPixmap(":/images/header"));
    header->setMaximumSize(156,156);
    header->setContentsMargins(26,26,0,0);
    header->setScaledContents(true);
    toolbar->addWidget(header);

	QLabel *l = new QLabel(this);
    l->setPixmap(QPixmap(":/images/spacer"));
    toolbar->addWidget(l);
    toolbar->addAction(overviewAction);
    toolbar->addAction(sendCoinsAction);
    toolbar->addAction(receiveCoinsAction);
    toolbar->addAction(historyAction);
    toolbar->addAction(addressBookAction);
    toolbar->setStyleSheet("#toolbar {background: transparent; text-align: center; color: black;padding-right: 30px;} QToolBar QToolButton:hover {background-color: transparent;} QToolBar QToolButton:selected {background-color: transparent;} QToolBar QToolButton:checked {background-color: transparent;} QToolBar QToolButton:pressed {background-color: transparent;} QToolBar QToolButton {font-family:Steps; font-size:15px; font-weight: bold; min-width:125px;max-width:125px; min-height:25px;max-height:25px; color: white; text-align: left; }");

}
开发者ID:CandyCoinDev,项目名称:c1,代码行数:30,代码来源:bitcoingui.cpp

示例4: createToolBars

void BitcoinGUI::createToolBars()
{

    QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
	toolbar->setObjectName("toolbar");
    toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
	addToolBar(Qt::LeftToolBarArea,toolbar);
    toolbar->setOrientation(Qt::Vertical);
    toolbar->setMovable(false);

    QWidget* header = new QWidget();
    header->setMinimumSize(140, 45);
    header->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    header->setStyleSheet("QWidget { background-color: rgb(0,0,0); background-repeat: no-repeat; background-image: url(:/images/header); background-position: top center; }");
    toolbar->addWidget(header);

    toolbar->addAction(overviewAction);
    toolbar->addAction(sendCoinsAction);
    toolbar->addAction(receiveCoinsAction);
    toolbar->addAction(historyAction);
    toolbar->addAction(addressBookAction);
	toolbar->addAction(bittrexPageAction);
	toolbar->addAction(shockBotAction);
    toolbar->addAction(blockAction);
    toolbar->addAction(socialPageAction);
	toolbar->addAction(chatAction);
    toolbar->addAction(exportAction);
}
开发者ID:M1xProject,项目名称:M1Project,代码行数:28,代码来源:bitcoingui.cpp

示例5: createToolBars

void BitcoinGUI::createToolBars()
{
    QToolBar *toolbar = addToolBar(tr("Screens toolbar"));
    toolbar->setObjectName("toolbar");
    addToolBar(Qt::LeftToolBarArea,toolbar);
    toolbar->setOrientation(Qt::Vertical);
    toolbar->setMovable( false );
    toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
    toolbar->setIconSize(QSize(50,25));
    toolbar->addAction(overviewAction);
    toolbar->addAction(sendCoinsAction);
    toolbar->addAction(receiveCoinsAction);
    toolbar->addAction(historyAction);
    toolbar->addAction(addressBookAction);
    toolbar->addAction(exportAction);
    toolbar->addAction(optionsAction);

    QWidget* spacer = new QWidget();
    spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    toolbar->addWidget(spacer);
    spacer->setObjectName("spacer");


    QToolBar *toolbar2 = addToolBar(tr("Actions toolbar"));
    toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
    toolbar2->addAction(openRPCConsoleAction);
    toolbar2->setVisible(false);
}
开发者ID:Aminulhaq,项目名称:LEOcoin,代码行数:28,代码来源:bitcoingui.cpp

示例6: initComps

void OptionsView::initComps()
{
    QWidget *widget = new QWidget;
    QVBoxLayout *vlayout = new QVBoxLayout;
    QToolBar *toolbar = new QToolBar;

    vlayout->setMargin(0);
    toolbar->setOrientation(Qt::Vertical);
    toolbar->setIconSize(QSize(24, 24));

    _startAction = new QAction(QIcon(":/logIcons/start"), "Lancer la simulation", this);
    _restartAction = new QAction(QIcon(":/logIcons/restart"), "Réinitialiser", this);
    _exercicesAction = new QAction(QIcon(":/logIcons/exercices"), "Liste des exercices", this);
    _astucesAction = new QAction(QIcon(":/logIcons/astuces"), "Astuces", this);
    _homeAction = new QAction(QIcon(":/logIcons/home"), "Quitter la simulation", this);

    toolbar->addAction(_startAction);
    toolbar->addAction(_restartAction);
    toolbar->addAction(_astucesAction);
    toolbar->addSeparator();
    toolbar->addAction(_exercicesAction);
    toolbar->addAction(_homeAction);

    vlayout->addWidget(toolbar);
    widget->setLayout(vlayout);

    setDefaultWidget(widget);
}
开发者ID:hesrondev,项目名称:sysCab,代码行数:28,代码来源:optionsview.cpp

示例7: createToolBars

void spincoinGUI::createToolBars()
{
    QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
    toolbar->setObjectName("toolbar");
    addToolBar(Qt::LeftToolBarArea,toolbar);
    toolbar->setOrientation(Qt::Vertical);
    toolbar->setMovable( false );
    toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
    toolbar->setIconSize(QSize(50,25));
    toolbar->addAction(overviewAction);
    toolbar->addAction(sendCoinsAction);
    toolbar->addAction(receiveCoinsAction);
    toolbar->addAction(historyAction);
    toolbar->addAction(addressBookAction);
	toolbar->addAction(statisticsAction);
	toolbar->addAction(blockAction);
	toolbar->addAction(unlockWalletAction);
	toolbar->addAction(lockWalletAction);
//	toolbar->addAction(exportAction);
    QWidget* spacer = new QWidget();
    spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    toolbar->addWidget(spacer);
    spacer->setObjectName("spacer");


}
开发者ID:magebane,项目名称:SpinCoin,代码行数:26,代码来源:spincoingui.cpp

示例8: createToolBars

void BitcoinGUI::createToolBars()
{
    QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
    toolbar->setObjectName("toolbar");
    addToolBar(Qt::LeftToolBarArea,toolbar);
    toolbar->setOrientation(Qt::Vertical);
    toolbar->setMovable( false );
    toolbar->setToolButtonStyle(Qt::ToolButtonTextOnly);
	QLabel *l = new QLabel(this);
    l->setPixmap(QPixmap(":/images/spacer"));
    toolbar->addWidget(l);
    toolbar->addAction(overviewAction);
    toolbar->addAction(statisticsAction);
    toolbar->addAction(blockAction);
    toolbar->addAction(chatAction);
#ifdef ENABLE_TRADE_REQUIRE_QT5
    toolbar->addAction(TradingAction);
#endif
//    toolbar->addAction(radioAction);
    toolbar->addAction(sendCoinsAction);
    toolbar->addAction(receiveCoinsAction);
    toolbar->addAction(historyAction);
    toolbar->addAction(addressBookAction);
    toolbar->setStyleSheet("#toolbar { border:1px;height:100%;padding-top:100px; background: transparent; text-align: center; color: #4DD0F0;min-width:200px;max-width:200px;} QToolBar QToolButton:hover {background-image: url(:images/1); background-color: transparent;} QToolBar QToolButton:selected {background-color: transparent;} QToolBar QToolButton:checked {background-image: url(:images/2); background-color: transparent;} QToolBar QToolButton:pressed {background-color: transparent;} QToolBar QToolButton { margin: 2px; background-image:url(:images/3); font-family:'Bebas'; font-size:14px; min-width:160px;max-width:160px; min-height:40px;max-height:40px; color: white; text-align: center; }");
}
开发者ID:PentaLHC,项目名称:PentaLHC,代码行数:25,代码来源:bitcoingui.cpp

示例9: setup

void ToolBoxManager::setup( ToolBarItem* toolBar ) const
{
    if ( !toolBar || !_toolBox )
        return; // empty tool bar

    int ct = _toolBox->count();
    for ( int i=0; i<ct; i++ )
    {
        // get always the first item widget
        QWidget* w = _toolBox->widget(0);
        _toolBox->removeItem(0);
        delete w;
    }

    CommandManager& mgr = Application::Instance->commandManager();
    QList<ToolBarItem*> items = toolBar->getItems();

    for ( QList<ToolBarItem*>::ConstIterator item = items.begin(); item != items.end(); ++item )
    {
        QToolBar* bar = new QToolBar();
        bar->setOrientation(Qt::Vertical);
        bar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
        std::string toolbarName = (*item)->command();
        bar->setObjectName(QString::fromLatin1((*item)->command().c_str()));
        bar->setWindowTitle(QObject::trUtf8(toolbarName.c_str())); // i18n
        _toolBox->addItem( bar, bar->windowTitle() );

        QList<ToolBarItem*> subitems = (*item)->getItems();
        for ( QList<ToolBarItem*>::ConstIterator subitem = subitems.begin(); subitem != subitems.end(); ++subitem )
        {
            if ( (*subitem)->command() == "Separator" ) {
                //bar->addSeparator();
            } else {
                mgr.addTo((*subitem)->command().c_str(), bar);
            }
        }

        // Now set the right size policy for each tool button
        QList<QToolButton*> tool = bar->findChildren<QToolButton*>();
        for (QList<QToolButton*>::Iterator it = tool.begin(); it != tool.end(); ++it) {
            (*it)->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
            // When setting the horizontal size policy but no icon is set we use the following trick
            // to make the button text left aligned.
            QIcon icon = (*it)->icon();
            if (icon.isNull())
            {
                // Create an icon filled with the button color
                int size = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize);
                QPixmap p(size, size);
                p.fill(Qt::transparent);
                (*it)->setIcon(p);
            }
        }
    }
}
开发者ID:3DPrinterGuy,项目名称:FreeCAD,代码行数:55,代码来源:ToolBoxManager.cpp

示例10: createToolBars

void BitcoinGUI::createToolBars()
{
	mainIcon = new QLabel (this);
    mainIcon->setPixmap(QPixmap(":icons/logo"));
    mainIcon->show();
	
	// For another time
	mainIcon2 = new QLabel (this);
    mainIcon2->setPixmap(QPixmap(":icons/logo2"));
    mainIcon2->show();
	
	QToolBar *toolbar2 = addToolBar(tr("BrexitCoin top-logo"));
	addToolBar(Qt::TopToolBarArea,toolbar2);
    toolbar2->setOrientation(Qt::Horizontal);
    toolbar2->setFloatable(false);
    toolbar2->setMovable(false);
    toolbar2->addWidget(mainIcon);
	
    QToolBar *toolbar = addToolBar(tr("Top toolbar"));
	addToolBar(Qt::TopToolBarArea,toolbar);
    toolbar->setOrientation(Qt::Horizontal);
	toolbar->setFloatable(false);
    toolbar->setMovable(false);
    toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    toolbar->addAction(overviewAction);
    toolbar->addAction(sendCoinsAction);
    toolbar->addAction(receiveCoinsAction);
    toolbar->addAction(historyAction);
    toolbar->addAction(addressBookAction);

    QToolBar *toolbar3 = addToolBar(tr("Side toolbar"));
	addToolBar(Qt::LeftToolBarArea,toolbar3);
    toolbar3->setOrientation(Qt::Vertical);
	toolbar3->setFloatable(false);
    toolbar3->setMovable(false);
    toolbar3->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
	toolbar3->addAction(chatAction);
   	toolbar3->addAction(stakeReportAction);
	toolbar3->addAction(charityAction);	
    toolbar3->addAction(blockAction);	
    toolbar3->addAction(openRPCConsoleAction);
    //toolbar3->addAction(exportAction);
	
	//For another time
	QWidget *spacer = makeToolBarSpacer();
	QToolBar *toolbar4 = addToolBar(tr("BrexitCoin side-logo"));
	addToolBar(Qt::LeftToolBarArea,toolbar4);
    toolbar4->setOrientation(Qt::Vertical);
    toolbar4->setFloatable(false);
    toolbar4->setMovable(false);
	toolbar4->addWidget(spacer);
    toolbar4->addWidget(mainIcon2);
	
}
开发者ID:BrexitCoinProject,项目名称:BrexitCoin,代码行数:54,代码来源:bitcoingui.cpp

示例11: QGridLayout

/*!
  \internal
  \brief Creates tool box on the right side.
 */
void Ui::MainWindow::createToolBox()
{
    // tool box of several tools
    QWidget *toolBoxContent = new QWidget;
    QGridLayout *layout = new QGridLayout(toolBoxContent);
    layout->setMargin(1);
    layout->setSpacing(2);
    toolBoxContent->setLayout(layout);

    QToolButton *selectToolButton = createToolButton(selectToolAction);
    layout->addWidget(selectToolButton, 0, 0, 1, 1);
    QToolButton *moveToolButton = createToolButton(moveToolAction);
    layout->addWidget(moveToolButton, 0, 1, 1, 1);

    QToolButton *paintCanToolButton = createToolButton(paintCanToolAction);
    layout->addWidget(paintCanToolButton, 1, 0, 1, 1);
    QToolButton *eraserToolButton = createToolButton(eraserToolAction);
    layout->addWidget(eraserToolButton, 1, 1, 1, 1);

    QToolButton *textToolButton = createToolButton(textToolAction);
    layout->addWidget(textToolButton, 2, 0, 1, 1);

    QToolButton *paintbrushToolButton = createToolButton(paintbrushToolAction);
    layout->addWidget(paintbrushToolButton, 3, 0, 1, 1);
    QToolButton *pencilToolButton = createToolButton(pencilToolAction);
    layout->addWidget(pencilToolButton, 3, 1, 1, 1);

    QToolButton *lineToolButton = createToolButton(lineToolAction);
    layout->addWidget(lineToolButton, 4, 0, 1, 1);
    QToolButton *curveToolButton = createToolButton(curveToolAction);
    layout->addWidget(curveToolButton, 4, 1, 1, 1);

    QToolButton *ellipseToolButton = createToolButton(ellipseToolAction);
    layout->addWidget(ellipseToolButton, 5, 0, 1, 1);
    QToolButton *rectangleToolButton = createToolButton(rectangleToolAction);
    layout->addWidget(rectangleToolButton, 5, 1, 1, 1);

    QToolButton *roundRectangleToolButton = createToolButton(roundRectangleToolAction);
    layout->addWidget(roundRectangleToolButton, 6, 0, 1, 1);
    QToolButton *polygonToolButton = createToolButton(polygonToolAction);
    layout->addWidget(polygonToolButton, 6, 1, 1, 1);

    ci = new ColorIndicator(toolBoxContent);
    layout->addWidget(ci, 7, 0, 2, 2, Qt::AlignCenter);

    QToolBar *toolBox = actionManager->toolBar(Core::ID::TOOL_BOX);
    toolBox->setObjectName("ToolBox");
    toolBox->setOrientation(Qt::Vertical);
    toolBox->addWidget(toolBoxContent);
    toolBox->setAllowedAreas(Qt::LeftToolBarArea | Qt::RightToolBarArea);
    addToolBar(Qt::LeftToolBarArea, toolBox);
}
开发者ID:jaisurya,项目名称:picworks,代码行数:56,代码来源:mainwindow.cpp

示例12: createToolBars

void BitcreditGUI::createToolBars()
{
	QLabel *mylabel = new QLabel(this);
	mylabel->setPixmap(QPixmap(":images/head"));
	mylabel->show();
    QToolBar *toolbar = addToolBar(tr("Menu"));
    toolbar->setObjectName("toolbar");
    addToolBar(Qt::LeftToolBarArea, toolbar);
    toolbar->addWidget(mylabel);
    toolbar->setOrientation(Qt::Vertical);
    toolbar->setMovable(false);
    toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
	toolbar->setIconSize(QSize(50,20));
	
	
    if(walletFrame)
    {
		
		toolbar->addAction(overviewAction);
        toolbar->addAction(sendCoinsAction);
        toolbar->addAction(receiveCoinsAction);
        toolbar->addAction(historyAction);
		toolbar->addAction(exchangeAction);
		toolbar->addAction(blockAction);
		toolbar->addAction(bankstatsAction);		        
	    toolbar->addAction(sendMessagesAction);
	    toolbar->addAction(messageAction);
	    toolbar->addAction(invoiceAction);
	    toolbar->addAction(receiptAction);		
		toolbar->addAction(voteCoinsAction);
		toolbar->addAction(chatAction);
		
        overviewAction->setChecked(true);
    }
    
    //QWidget* spacer = new QWidget();
   // spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
   // toolbar->addWidget(spacer);
    toolbar->addAction(optionsAction);
    //spacer->setObjectName("spacer");
    toolbar->setStyleSheet("#toolbar { font-weight:600;border:none;height:100%;padding-top:20px; background: rgb(0, 0, 0); text-align: left; color: white;min-width:180px;max-width:180px;} QToolBar QToolButton:hover {background:rgb(28, 29, 33);} QToolBar QToolButton:checked {background:rgba(28, 29, 33, 100);}  QToolBar QToolButton { font-weight:600;font-size:10px;font-family:'Century Gothic';padding-left:20px;padding-right:181px;padding-top:4px;padding-bottom:4px; width:100%; color: white; text-align: left; background:transparent;text-transform:uppercase; }");
        	
}
开发者ID:JoshuaAmsden,项目名称:bicreditsnew,代码行数:43,代码来源:bitcreditgui.cpp

示例13: QPlasmaDocument

/* QPlasmaPakFile */
QPlasmaPakFile::QPlasmaPakFile(QWidget* parent)
              : QPlasmaDocument(kDocPackage, parent)
{
    fFileList = new QTreeWidget(this);
    fFileList->setUniformRowHeights(true);
    fFileList->setRootIsDecorated(false);
    fFileList->setEditTriggers(QAbstractItemView::SelectedClicked |
                               QAbstractItemView::EditKeyPressed);
    fFileList->setContextMenuPolicy(Qt::CustomContextMenu);
    fFileList->setSelectionMode(QAbstractItemView::ExtendedSelection);
    fFileList->setHeaderLabels(QStringList() << "Filename" << "Size");

    QToolBar* toolbar = new QToolBar(this);
    toolbar->setOrientation(Qt::Vertical);
    toolbar->setToolButtonStyle(Qt::ToolButtonIconOnly);
    toolbar->setIconSize(QSize(22, 22));

    QGridLayout* layout = new QGridLayout(this);
    layout->setContentsMargins(4, 4, 4, 4);
    layout->addWidget(fFileList, 0, 0);
    layout->addWidget(toolbar, 0, 1);
    setLayout(layout);

    fActions[kAdd] = new QAction(qStdIcon("list-add"), tr("&Add / Update..."), this);
    fActions[kDel] = new QAction(qStdIcon("list-remove"), tr("&Delete"), this);
    fActions[kExtract] = new QAction(qStdIcon("document-save"), tr("&Extract..."), this);
    fActions[kExtractAll] = new QAction(QIcon(":/img/pak.png"), tr("Ex&tract all..."), this);

    toolbar->addAction(fActions[kAdd]);
    toolbar->addAction(fActions[kDel]);
    toolbar->addSeparator();
    toolbar->addAction(fActions[kExtract]);
    toolbar->addAction(fActions[kExtractAll]);

    connect(fFileList, SIGNAL(customContextMenuRequested(QPoint)),
            this, SLOT(onContextMenu(QPoint)));
    connect(fActions[kAdd], SIGNAL(triggered()), this, SLOT(onAdd()));
    connect(fActions[kDel], SIGNAL(triggered()), this, SLOT(onDel()));
    connect(fActions[kExtract], SIGNAL(triggered()), this, SLOT(onExtract()));
    connect(fActions[kExtractAll], SIGNAL(triggered()), this, SLOT(onExtractAll()));
}
开发者ID:Deledrius,项目名称:PlasmaShop,代码行数:42,代码来源:QPlasmaPakFile.cpp

示例14: QPlasmaDocument

QPlasmaSumFile::QPlasmaSumFile(QWidget* parent)
              : QPlasmaDocument(kDocManifest, parent)
{
    fFileList = new QTreeWidget(this);
    fFileList->setUniformRowHeights(true);
    fFileList->setRootIsDecorated(false);
    fFileList->setEditTriggers(QAbstractItemView::SelectedClicked |
                               QAbstractItemView::EditKeyPressed);
    fFileList->setContextMenuPolicy(Qt::CustomContextMenu);
    fFileList->setSelectionMode(QAbstractItemView::ExtendedSelection);
    fFileList->setHeaderLabels(QStringList() << "Filename" << "Timestamp" << "MD5");

    QToolBar* toolbar = new QToolBar(this);
    toolbar->setOrientation(Qt::Vertical);
    toolbar->setToolButtonStyle(Qt::ToolButtonIconOnly);
    toolbar->setIconSize(QSize(22, 22));

    QGridLayout* layout = new QGridLayout(this);
    layout->setContentsMargins(4, 4, 4, 4);
    layout->addWidget(fFileList, 0, 0);
    layout->addWidget(toolbar, 0, 1);
    setLayout(layout);

    fActions[kAUpdate] = new QAction(qStdIcon("view-refresh"), tr("&Update all..."), this);
    fActions[kAAdd] = new QAction(qStdIcon("list-add"), tr("&Add / Update..."), this);
    fActions[kADel] = new QAction(qStdIcon("list-remove"), tr("&Remove"), this);

    toolbar->addAction(fActions[kAUpdate]);
    toolbar->addSeparator();
    toolbar->addAction(fActions[kAAdd]);
    toolbar->addAction(fActions[kADel]);

    connect(fFileList, SIGNAL(customContextMenuRequested(QPoint)),
            this, SLOT(onContextMenu(QPoint)));
    connect(fFileList, SIGNAL(itemChanged(QTreeWidgetItem*, int)),
            this, SLOT(onItemChanged(QTreeWidgetItem*, int)));
    connect(fActions[kAUpdate], SIGNAL(triggered()), this, SLOT(onUpdate()));
    connect(fActions[kAAdd], SIGNAL(triggered()), this, SLOT(onAdd()));
    connect(fActions[kADel], SIGNAL(triggered()), this, SLOT(onDel()));
}
开发者ID:diafero,项目名称:PlasmaShop,代码行数:40,代码来源:QPlasmaSumFile.cpp

示例15: createToolBars

void BitcoinGUI::createToolBars()
{
    QLabel *mylabel = new QLabel (this);
    mylabel->setPixmap(QPixmap(":images/head"));
    mylabel->show();
	
	QToolBar* toolbar = new QToolBar(this);
	toolbar->setObjectName("toolbar");
	addToolBar(Qt::LeftToolBarArea, toolbar);
    toolbar->setIconSize(QSize(60,36));
	toolbar->setOrientation(Qt::Vertical);
	toolbar->setMovable( false );
    toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
	toolbar->addWidget(mylabel);
    toolbar->addAction(overviewAction);
    toolbar->addAction(sendCoinsAction);
    toolbar->addAction(receiveCoinsAction);
    toolbar->addAction(historyAction);
    toolbar->addAction(addressBookAction);
	
	toolbar->setStyleSheet("#toolbar { font-weight:300;border:none;height:100%;padding-top:20px; background: #0d506f; text-align: left; color: black;} QToolBar QToolButton:hover {background:rgb(65,139,202);} QToolBar QToolButton:checked {background:rgba(65,139,202);}  QToolBar QToolButton { font-weight:300;font-size:12px;font-family:'Roboto';padding-left:1px;padding-right:60px;padding-top:5px;padding-bottom:5px; height: 32px; width: 32px; color: black; text-align: left; background:transparent;text-transform:uppercase; }");
}
开发者ID:guaranycryptocurrency,项目名称:Guarany,代码行数:22,代码来源:bitcoingui.cpp


注:本文中的QToolBar::setOrientation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。