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


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

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


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

示例1: setupToolBar

void TupMainWindow::setupToolBar()
{
    QToolBar * toolbar = new QToolBar(tr("Actions Bar"), this);
    toolbar->setIconSize(QSize(22,22));
    addToolBar(Qt::TopToolBarArea, toolbar);

    toolbar->addAction(m_actionManager->find("newproject"));
    toolbar->addAction(m_actionManager->find("openproject"));
    toolbar->addAction(m_actionManager->find("opennetproject"));
    toolbar->addAction(m_actionManager->find("saveproject"));
    toolbar->addAction(m_actionManager->find("saveprojectas"));
    toolbar->addAction(m_actionManager->find("closeproject"));
}
开发者ID:skaarj37,项目名称:tupi,代码行数:13,代码来源:tupmainwindow_gui.cpp

示例2: QDockWidget

ScriptDock::ScriptDock(QWidget *parent)
    : QDockWidget(parent),
    mFileName(tr("untitled.lua")),
    mMapDocument(0)
{
    setObjectName(QLatin1String("scriptViewDock"));

    mScriptArea = new ScriptEditor(this);
    mScriptArea->setLineWrapMode(QPlainTextEdit::NoWrap);
    connect(mScriptArea, SIGNAL(textChanged()),
            SLOT(scriptChanged()));

    mOutputArea = new QPlainTextEdit(this);
    mOutputArea->setReadOnly(true);

    highlighter = new ScriptHighlighter(mScriptArea->document());


    QToolBar *buttonContainer = new QToolBar(this);
    buttonContainer->setFloatable(false);
    buttonContainer->setMovable(false);
    buttonContainer->setIconSize(QSize(16, 16));

    QAction *runAction = new QAction(this);
    runAction->setShortcut(tr("Ctrl+Shift+R"));
    runAction->setIcon(
            QIcon(QLatin1String(":/images/16x16/script_run.png")));

    buttonContainer->addAction(runAction);

    connect(runAction, SIGNAL(triggered()),
            SLOT(runScript()));

    QWidget *widget = new QWidget(this);
    QVBoxLayout *layout = new QVBoxLayout(widget);
    layout->setMargin(5);

    QSplitter *splitter = new QSplitter(Qt::Vertical, widget);
    splitter->addWidget(mScriptArea);
    splitter->addWidget(mOutputArea);
    layout->addWidget(splitter);
    layout->addWidget(buttonContainer);

    QList<int> sizeList;
    sizeList << 500 << 100;
    splitter->setSizes(sizeList);

    setWidget(widget);
    retranslateUi();
}
开发者ID:christophe-conceicao,项目名称:tiled,代码行数:50,代码来源:scriptdock.cpp

示例3: createToolBar

void lmcTransferWindow::createToolBar(void) {
	QToolBar* pToolBar = new QToolBar(ui.wgtToolBar);
	pToolBar->setIconSize(QSize(16, 16));
	pToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
	ui.toolBarLayout->addWidget(pToolBar);

	pactCancel = pToolBar->addAction(QIcon(QPixmap(IDR_STOP, "PNG")), "Cancel", 
		this, SLOT(btnCancel_clicked()));
	pToolBar->addSeparator();
	pactShowFolder = pToolBar->addAction(QIcon(QPixmap(IDR_FOLDER, "PNG")), "Show In Folder", 
		this, SLOT(btnShowFolder_clicked()));
	pactRemove = pToolBar->addAction(QIcon(QPixmap(IDR_DECLINE, "PNG")), "Remove From List",
		this, SLOT(btnRemove_clicked()));
}
开发者ID:Litew,项目名称:lanmsng,代码行数:14,代码来源:transferwindow.cpp

示例4: QDockWidget

EditTools::EditTools(QWidget* parent)
  : QDockWidget(parent)
      {
      setObjectName("edit-tools");
      setWindowTitle(tr("Edit Mode Tools"));
      setAllowedAreas(Qt::DockWidgetAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea));

      QToolBar* tb = new QToolBar(tr("Edit Mode Tools"));
      tb->setIconSize(QSize(preferences.iconWidth, preferences.iconHeight));

      QToolButton* b = new QToolButton(this);
      QAction* a = getAction("hraster");
      a->setCheckable(true);
      b->setDefaultAction(a);
      b->setContextMenuPolicy(Qt::ActionsContextMenu);
      b->addAction(getAction("config-raster"));
      tb->addWidget(b);

      b = new QToolButton(this);
      a = getAction("vraster");
      a->setCheckable(true);
      b->setDefaultAction(a);
      b->setContextMenuPolicy(Qt::ActionsContextMenu);
      b->addAction(getAction("config-raster"));
      tb->addWidget(b);

      _editX  = new QDoubleSpinBox(this);
      _editX->setSuffix(tr("sp"));
      _editX->setRange(-99999, 99999);
      _editX->setSingleStep(.1);
      _editY  = new QDoubleSpinBox(this);
      _editY->setSuffix(tr("sp"));
      _editY->setRange(-99999, 99999);
      _editY->setSingleStep(.1);
      xLabel = new QLabel(tr("x:"), this);
      yLabel = new QLabel(tr("y:"), this);
      _localEdit = false;
      tb->addWidget(xLabel);
      tb->addWidget(_editX);
      tb->addWidget(yLabel);
      tb->addWidget(_editY);

      connect(_editX, SIGNAL(valueChanged(double)), SLOT(editXChanged(double)));
      connect(_editY, SIGNAL(valueChanged(double)), SLOT(editYChanged(double)));

      setWidget(tb);
      QWidget* w = new QWidget(this);
      setTitleBarWidget(w);
      titleBarWidget()->hide();
      }
开发者ID:kcuzner,项目名称:MuseScore,代码行数:50,代码来源:edittools.cpp

示例5: font

ServerWidget::ServerWidget(QWidget *parent,
		const QString &nodeName, int listenPort)
		: QMainWindow(parent) {
	m_contents = new QTextEdit(this);
	QFont font("Monospace");
	font.setStyleHint(QFont::TypeWriter);
	m_contents->setFont(font);
	m_contents->setReadOnly(true);
	QPalette palette;
	palette.setColor(QPalette::Base, Qt::black);
	m_contents->setPalette(palette);
	setPalette(palette);
	QToolBar *toolBar = new QToolBar(this);
	toolBar->setMovable(false);
	toolBar->setAllowedAreas(Qt::TopToolBarArea);
	toolBar->setIconSize(QSize(32, 32));
	toolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
	toolBar->setFloatable(false);

	QAction *actionClear = new QAction(this);
	QIcon clearIcon;
	clearIcon.addFile(QString::fromUtf8(":/resources/clear.png"), QSize(), QIcon::Normal, QIcon::Off);
	actionClear->setIcon(clearIcon);
    actionClear->setToolTip(tr("Clear"));
    actionClear->setText(tr("Clear"));
	connect(actionClear, SIGNAL(triggered()), m_contents, SLOT(clear()));
	toolBar->addAction(actionClear);

#if defined(__OSX__)
	toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
#endif

    addToolBar(Qt::TopToolBarArea, toolBar);
	setCentralWidget(m_contents);
    setUnifiedTitleAndToolBarOnMac(true);
	setMenuBar(NULL);
	setWindowTitle(tr("Server Log"));
	resize(QSize(1000, 500));

	QConsoleAppender *consoleAppender = new QConsoleAppender();

	m_logger = new Logger(Thread::getThread()->getLogger()->getLogLevel());
	m_logger->addAppender(consoleAppender);
	m_logger->setFormatter(new DefaultFormatter());
	connect(consoleAppender, SIGNAL(textMessage(ELogLevel, const QString &)),
		this, SLOT(onTextMessage(ELogLevel, const QString &)), Qt::QueuedConnection);

	m_thread = new ServerThread(m_logger, listenPort, nodeName.toStdString());
	m_thread->start();
}
开发者ID:AdrianJohnston,项目名称:ShapeNetRender,代码行数:50,代码来源:server.cpp

示例6: QWidget

QWidget *TasksViewer::createToolBar() {
  // Create toolbar. It is an horizontal layout with three internal toolbar.
  QWidget *toolBarWidget = new QWidget(this);
  QToolBar *cmdToolbar   = new QToolBar(toolBarWidget);
  cmdToolbar->setIconSize(QSize(21, 17));
  cmdToolbar->clear();
  cmdToolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
  add("start", tr("&Start"), cmdToolbar, SLOT(start(bool)), tr("Start"));
  add("stop", tr("&Stop"), cmdToolbar, SLOT(stop(bool)), tr("Stop"));
  cmdToolbar->addSeparator();
  add("addrender", tr("&Add Render Task"), cmdToolbar,
      SLOT(addRenderTask(bool)), tr("Add Render"));
  add("addcleanup", tr("&Add Cleanup Task"), cmdToolbar,
      SLOT(addCleanupTask(bool)), tr("Add Cleanup"));

  QToolBar *saveToolbar = new QToolBar(toolBarWidget);
  saveToolbar->setIconSize(QSize(21, 17));
  saveToolbar->clear();
  saveToolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
  add("save", tr("&Save Task List"), saveToolbar, SLOT(save(bool)), tr("Save"));
  add("saveas", tr("&Save Task List As"), saveToolbar, SLOT(saveas(bool)),
      tr("Save As"));
  add("load", tr("&Load Task List"), saveToolbar, SLOT(load(bool)), tr("Load"));
  saveToolbar->addSeparator();
  add("delete", tr("&Remove"), saveToolbar, SLOT(remove(bool)), tr("Remove"));

  QVBoxLayout *toolbarLayout = new QVBoxLayout(toolBarWidget);
  toolbarLayout->setMargin(0);
  toolbarLayout->setSpacing(0);
  {
    toolbarLayout->addWidget(cmdToolbar);
    toolbarLayout->addWidget(saveToolbar);
  }
  toolBarWidget->setLayout(toolbarLayout);

  return toolBarWidget;
}
开发者ID:walkerka,项目名称:opentoonz,代码行数:37,代码来源:tasksviewer.cpp

示例7: QWidget

UserBrokerTransactionsWidget::UserBrokerTransactionsWidget(QTabFramework& tabFramework, QSettings& settings, Entity::Manager& entityManager, DataService& dataService) :
  QWidget(&tabFramework), tabFramework(tabFramework), entityManager(entityManager), dataService(dataService), transactionsModel(entityManager)
{
  entityManager.registerListener<EConnection>(*this);

  setWindowTitle(tr("Transactions"));

  QToolBar* toolBar = new QToolBar(this);
  toolBar->setStyleSheet("QToolBar { border: 0px }");
  toolBar->setIconSize(QSize(16, 16));
  toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
  refreshAction = toolBar->addAction(QIcon(":/Icons/arrow_refresh.png"), tr("&Refresh"));
  refreshAction->setEnabled(false);
  refreshAction->setShortcut(QKeySequence(QKeySequence::Refresh));
  connect(refreshAction, SIGNAL(triggered()), this, SLOT(refresh()));

  transactionView = new QTreeView(this);
  transactionView->setUniformRowHeights(true);
  proxyModel = new UserBrokerTransactionsSortProxyModel(this);
  proxyModel->setSourceModel(&transactionsModel);
  proxyModel->setDynamicSortFilter(true);
  transactionView->setModel(proxyModel);
  transactionView->setSortingEnabled(true);
  transactionView->setRootIsDecorated(false);
  transactionView->setAlternatingRowColors(true);
  //transactionView->setSelectionMode(QAbstractItemView::ExtendedSelection);

  QVBoxLayout* layout = new QVBoxLayout;
  layout->setMargin(0);
  layout->setSpacing(0);
  layout->addWidget(toolBar);
  layout->addWidget(transactionView);
  setLayout(layout);

  QHeaderView* headerView = transactionView->header();
  headerView->resizeSection(0, 50);
  headerView->resizeSection(1, 110);
  headerView->resizeSection(2, 85);
  headerView->resizeSection(3, 100);
  headerView->resizeSection(4, 85);
  headerView->resizeSection(5, 75);
  headerView->resizeSection(6, 85);
  transactionView->sortByColumn(1);
  settings.beginGroup("Transactions");
  headerView->restoreState(settings.value("HeaderState").toByteArray());
  settings.endGroup();
  headerView->setStretchLastSection(false);
  headerView->setResizeMode(0, QHeaderView::Stretch);
}
开发者ID:donpillou,项目名称:MegucoClient,代码行数:49,代码来源:UserBrokerTransactionsWidget.cpp

示例8:

static QToolBar *createToolBar(const QWidget *someWidget, QAction *submitAction, QAction *diffAction)
{
    // Create
    QToolBar *toolBar = new QToolBar;
    toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
    const int size = someWidget->style()->pixelMetric(QStyle::PM_SmallIconSize);
    toolBar->setIconSize(QSize(size, size));
    toolBar->addSeparator();

    if (submitAction)
        toolBar->addAction(submitAction);
    if (diffAction)
        toolBar->addAction(diffAction);
    return toolBar;
}
开发者ID:ltcmelo,项目名称:qt-creator,代码行数:15,代码来源:vcsbasesubmiteditor.cpp

示例9: setupUi

void SurveyEditorGeneratorPage::setupUi()
{
	QBoxLayout * vlayout = new QVBoxLayout();
	QBoxLayout * infolayout = new QVBoxLayout();
	QBoxLayout * hlayout = new QHBoxLayout();

	QToolBar * toolbar = new QToolBar(this);
	toolbar->setIconSize( QSize(48,48) );
	toolbar->addAction(QIcon(global::R.getValue("icon/scripteditorrun")),
						tr("Run Script"),
						this,SLOT(onActionRunScript()));

	Overlay * o =mScriptView->overlay();
	o->setMovie( new QMovie( global::R.getValue("animation/loading") ));
	o->movie()->start();
	o->hide();


	mDescriptionEdit = new PlainTextEdit(this);
	mDescriptionEdit->overlay()->setText( tr("Description") );
	mDescriptionEdit->setToolTip( mDescriptionEdit->overlay()->text() );
	mDescriptionEdit->setReadOnly(true);

	mAuthorEdit = new LineEdit(this);
	mAuthorEdit->overlay()->setText( tr("Author") );
	mAuthorEdit->setToolTip( mAuthorEdit->overlay()->text() );
	mAuthorEdit->setReadOnly(true);

	mVersionEdit = new LineEdit(this);
	mVersionEdit->overlay()->setText( tr("Version") );
	mVersionEdit->setToolTip( mVersionEdit->overlay()->text() );
	mVersionEdit->setReadOnly(true);

	vlayout->addWidget(toolbar);

	hlayout->addWidget(mScriptView);

	infolayout->addWidget(mDescriptionEdit);
	infolayout->addWidget(mAuthorEdit);
	infolayout->addWidget(mVersionEdit);
	infolayout->addStretch();

	hlayout->addLayout(infolayout);
	vlayout->addLayout(hlayout);

	setLayout(vlayout);
	updateScriptList();
}
开发者ID:ohager,项目名称:kantalupe,代码行数:48,代码来源:SurveyEditorGeneratorPage.cpp

示例10: ico_cut

notepad::notepad() : QWidget(NULL)
{
  QVBoxLayout* top_layout = new QVBoxLayout(this);
  m_we = new QPlainTextEdit(this);

  QHBoxLayout* hbl = new QHBoxLayout;
  top_layout->addLayout(hbl);

//  m_save_button = new QPushButton(tr("Save"));

  QToolBar* toolbar = new QToolBar();
  toolbar->setIconSize(QSize(16,16));
  toolbar->setFloatable(true);
  m_action_save = toolbar->addAction(tr("Save"), this, SLOT(save()));
  
  top_layout->addWidget(toolbar);
  top_layout->addWidget(m_we);
//  hbl->addWidget(m_save_button);
//  hbl->setStretchFactor(m_save_button, 0);
//  hbl->addStretch(1);

  QIcon ico_cut(UI_ICON(FT_ICON16_EDIT_CUT));
  QIcon ico_copy(UI_ICON(FT_ICON16_EDIT_COPY));
  QIcon ico_paste(UI_ICON(FT_ICON16_EDIT_PASTE));
  QIcon ico_undo(UI_ICON(FT_ICON16_UNDO));
  QIcon ico_redo(UI_ICON(FT_ICON16_REDO));
  toolbar->addSeparator();

  toolbar->addAction(ico_cut, tr("Cut"), m_we, SLOT(cut()));
  toolbar->addAction(ico_copy, tr("Copy"), m_we, SLOT(copy()));
  toolbar->addAction(ico_paste, tr("Paste"), m_we, SLOT(paste()));
  toolbar->addAction(ico_undo, tr("Undo"), m_we, SLOT(undo()));
  toolbar->addAction(ico_redo, tr("Redo"), m_we, SLOT(redo()));

  //  connect(m_save_button, SIGNAL(clicked()), this, SLOT(save()));
  load();
  disable_save();

  m_timer = new QTimer(this);
  connect(m_timer, SIGNAL(timeout()), this, SLOT(auto_save()));
  m_timer->start(60*1000); // auto-save every minute

  connect(m_we, SIGNAL(textChanged()), this, SLOT(enable_save()));

  setWindowTitle(tr("Global Notepad"));
  setWindowIcon(UI_ICON(ICON16_NOTEPAD));
  resize(640, 400);
}
开发者ID:albancrommer,项目名称:manitou-mail-ui,代码行数:48,代码来源:notepad.cpp

示例11:

QToolBar *FormEditorW::createEditorToolBar() const
{
    QToolBar *editorToolBar = new QToolBar;
    const QList<Id>::const_iterator cend = m_toolActionIds.constEnd();
    for (QList<Id>::const_iterator it = m_toolActionIds.constBegin(); it != cend; ++it) {
        Command *cmd = ActionManager::command(*it);
        QTC_ASSERT(cmd, continue);
        QAction *action = cmd->action();
        if (!action->icon().isNull()) // Simplify grid has no action yet
            editorToolBar->addAction(action);
    }
    const int size = editorToolBar->style()->pixelMetric(QStyle::PM_SmallIconSize);
    editorToolBar->setIconSize(QSize(size, size));
    editorToolBar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
    return editorToolBar;
}
开发者ID:FlavioFalcao,项目名称:qt-creator,代码行数:16,代码来源:formeditorw.cpp

示例12: CreateCodeActions

 void CQTOpenGLLuaMainWindow::CreateCodeActions() {
    QIcon cCodeExecuteIcon;
    cCodeExecuteIcon.addPixmap(QPixmap(m_pcMainWindow->GetIconDir() + "/execute.png"));
    m_pcCodeExecuteAction = new QAction(cCodeExecuteIcon, tr("&Execute"), this);
    m_pcCodeExecuteAction->setToolTip(tr("Execute code"));
    m_pcCodeExecuteAction->setStatusTip(tr("Execute code"));
    m_pcCodeExecuteAction->setShortcut(tr("Ctrl+E"));
    connect(m_pcCodeExecuteAction, SIGNAL(triggered()),
            this, SLOT(Execute()));
    QMenu* pcMenu = menuBar()->addMenu(tr("&Code"));
    pcMenu->addAction(m_pcCodeExecuteAction);
    QToolBar* pcToolBar = addToolBar(tr("Code"));
    pcToolBar->setObjectName("CodeToolBar");
    pcToolBar->setIconSize(QSize(32,32));
    pcToolBar->addAction(m_pcCodeExecuteAction);
 }
开发者ID:hoelzl,项目名称:argos3,代码行数:16,代码来源:qtopengl_lua_main_window.cpp

示例13:

QToolBar * DesignNetFormManager::createEditorToolBar() const
{
	QToolBar *editorToolBar = new QToolBar;
	const QList<Core::Id>::const_iterator cend = d->m_toolActionIds.constEnd();
	for (QList<Core::Id>::const_iterator it = d->m_toolActionIds.constBegin(); it != cend; ++it)
	{
		Core::Command *cmd = Core::ActionManager::instance()->command(*it);
		QAction *action = cmd->action();
		if (!action->icon().isNull())
			editorToolBar->addAction(action);
	}
	const int size = editorToolBar->style()->pixelMetric(QStyle::PM_SmallIconSize);
	editorToolBar->setIconSize(QSize(size, size));
	editorToolBar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
	return editorToolBar;
}
开发者ID:Daylie,项目名称:Totem,代码行数:16,代码来源:designnetformmanager.cpp

示例14: QDialog

FiltersDialog::FiltersDialog(QWidget *parent, Qt::WindowFlags f)
    :
        QDialog(parent, f)
{
    QToolBar *toolBar = new QToolBar(this);
    toolBar->setIconSize(QSize(16, 16));
    toolBar->addAction(QIcon(":icons/filter_add"), "New Filter...",
                       this, SLOT(onNewFilter()));
    toolBar->addAction(QIcon(":icons/filter_edit"), "Change Filter...",
                       this, SLOT(onFilterEdit()));
    toolBar->addAction(QIcon(":icons/filter_delete"), "Delete",
                       this, SLOT(onFilterDelete()));

    m_filtersTree = new QTreeWidget(this);
    m_filtersTree->setColumnCount(2);
    m_filtersTree->setRootIsDecorated(false);
    QStringList headerLabels;
    headerLabels << "Filter" << "Enable";
    m_filtersTree->setHeaderLabels(headerLabels);
    m_filtersTree->header()->resizeSection(Name, 250);
    m_filtersTree->header()->setResizeMode(Enable, QHeaderView::Fixed);
    m_filtersTree->header()->setStretchLastSection(false);

    QVBoxLayout *tblWithBtns = new QVBoxLayout;
    tblWithBtns->addWidget(toolBar);
    tblWithBtns->addWidget(m_filtersTree);

    QPushButton *btnOk = new QPushButton(str::Ok, this);
    connect(btnOk, SIGNAL(clicked()), this, SLOT(accept()));
    btnOk->setDefault(true);
    QPushButton *btnCancel = new QPushButton(str::Cancel, this);
    connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject()));

    QHBoxLayout *btnLayout = new QHBoxLayout;
    btnLayout->addStretch();
    btnLayout->addWidget(btnOk);
    btnLayout->addWidget(btnCancel);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addLayout(tblWithBtns);
    mainLayout->addLayout(btnLayout);

    setLayout(mainLayout);
    setWindowTitle("Filters");
    resize(400, 300);
}
开发者ID:vahancho,项目名称:oragir,代码行数:46,代码来源:dlgFilters.cpp

示例15: QWidget

  Viewport::Viewport(QWidget* parent) : QWidget(parent)
  {
    QVBoxLayout* layout = new QVBoxLayout(this);
    layout->setMargin(0);
    layout->setSpacing(0);

    m_gl_widget = MainWindow::instance().createGL<GLWidget>(this);
    layout->addWidget(m_gl_widget);

    QToolBar* tb = new QToolBar(this);
    tb->setFloatable(false);
    tb->setMovable(false);
    tb->setIconSize(QSize(16, 16));
    layout->addWidget(tb);

    m_new_object = tb->addAction(QIcon(":/icons/new_object.png"), "New object", this, SLOT(newObject()));
    m_new_light = tb->addAction(QIcon(":/icons/new_light.png"), "New light", this, SLOT(newLight()));
    m_new_light->setEnabled(false);
    tb->addSeparator();
    m_translate = tb->addAction(QIcon(":/icons/translate.png"), "Translate (W)", this, SLOT(translateGizmo()));
    m_translate->setCheckable(true);
    m_translate->setChecked(true);
    m_rotate = tb->addAction(QIcon(":/icons/rotate.png"), "Rotate (E)", this, SLOT(rotateGizmo()));
    m_rotate->setCheckable(true);
    m_rotate->setChecked(false);
    m_scale = tb->addAction(QIcon(":/icons/scale.png"), "Scale (R)", this, SLOT(scaleGizmo()));
    m_scale->setCheckable(true);
    m_scale->setChecked(false);
    m_scale->setEnabled(false);
    tb->addSeparator();
    m_frame_selection = tb->addAction(QIcon(":/icons/frame.png"), "Frame selection (F)", this, SLOT(frameSelection()));
    m_frame_selection->setEnabled(false);
    m_frame_all = tb->addAction(QIcon(":/icons/frame_all.png"), "Frame all (A)", this, SLOT(frameAll()));
    m_frame_all->setEnabled(false);
    tb->addSeparator();
    m_scene_mode = tb->addAction(QIcon(":/icons/blueprint.png"), "Blueprint mode (B)", this, SLOT(sceneMode()));
    m_scene_mode->setChecked(true);
    m_scene_mode->setEnabled(false);
    m_render_mode = tb->addAction(QIcon(":/icons/shader.png"), "Render mode (G)", this, SLOT(renderMode()));
    m_render_mode->setEnabled(false);
    tb->addSeparator();
    m_delete_object = tb->addAction(QIcon(":/icons/delete.png"), "Delete object", this, SLOT(deleteObject()));

    translateGizmo();
  }
开发者ID:LBdN,项目名称:Shaderkit,代码行数:45,代码来源:viewport.cpp


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