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


C++ QStatusBar::setObjectName方法代码示例

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


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

示例1: QMainWindow

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent)
{
  QMenuBar *menuBar;
  QToolBar *mainToolBar;
  QWidget *centralWidget;
  QStatusBar *statusBar;
  if (this->objectName().isEmpty())
      this->setObjectName(QString::fromUtf8("MainWindow"));
  this->resize(400, 300);
  menuBar = new QMenuBar(this);
  menuBar->setObjectName(QString::fromUtf8("menuBar"));
  this->setMenuBar(menuBar);
  mainToolBar = new QToolBar(this);
  mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
  this->addToolBar(mainToolBar);
  centralWidget = new QWidget(this);
  centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
  this->setCentralWidget(centralWidget);
  statusBar = new QStatusBar(this);
  statusBar->setObjectName(QString::fromUtf8("statusBar"));
  this->setStatusBar(statusBar);

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
  this->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0));
#else
  this->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8));
#endif

  QMetaObject::connectSlotsByName(this);
}
开发者ID:OpenModelica,项目名称:OMNotebook,代码行数:31,代码来源:mainwindow.cpp

示例2: setupUi

    void setupUi(QMainWindow *Detection)
    {
        if (Detection->objectName().isEmpty())
            Detection->setObjectName(QString::fromUtf8("Detection"));
        Detection->resize(729, 480);
        actionE_xit = new QAction(Detection);
        actionE_xit->setObjectName(QString::fromUtf8("actionE_xit"));
        action_Load_Map = new QAction(Detection);
        action_Load_Map->setObjectName(QString::fromUtf8("action_Load_Map"));
        action_Connect = new QAction(Detection);
        action_Connect->setObjectName(QString::fromUtf8("action_Connect"));
        action_Disconnect = new QAction(Detection);
        action_Disconnect->setObjectName(QString::fromUtf8("action_Disconnect"));
        centralWidget = new QWidget(Detection);
        centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
        gridLayoutWidget = new QWidget(centralWidget);
        gridLayoutWidget->setObjectName(QString::fromUtf8("gridLayoutWidget"));
        gridLayoutWidget->setGeometry(QRect(0, 0, 721, 421));
        gridLayout = new QGridLayout(gridLayoutWidget);
        gridLayout->setSpacing(6);
        gridLayout->setContentsMargins(11, 11, 11, 11);
        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
        gridLayout->setSizeConstraint(QLayout::SetNoConstraint);
        gridLayout->setVerticalSpacing(5);
        gridLayout->setContentsMargins(0, 0, 0, 0);
        ugvFeedLabel = new QLabel(gridLayoutWidget);
        ugvFeedLabel->setObjectName(QString::fromUtf8("ugvFeedLabel"));
        QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
        sizePolicy.setHorizontalStretch(0);
        sizePolicy.setVerticalStretch(0);
        sizePolicy.setHeightForWidth(ugvFeedLabel->sizePolicy().hasHeightForWidth());
        ugvFeedLabel->setSizePolicy(sizePolicy);

        gridLayout->addWidget(ugvFeedLabel, 1, 2, 1, 1);

        connectionButton = new QCommandLinkButton(gridLayoutWidget);
        connectionButton->setObjectName(QString::fromUtf8("connectionButton"));

        gridLayout->addWidget(connectionButton, 0, 2, 1, 1);

        uavFeedLabel = new QLabel(gridLayoutWidget);
        uavFeedLabel->setObjectName(QString::fromUtf8("uavFeedLabel"));
        sizePolicy.setHeightForWidth(uavFeedLabel->sizePolicy().hasHeightForWidth());
        uavFeedLabel->setSizePolicy(sizePolicy);
        uavFeedLabel->setMaximumSize(QSize(16777215, 16777215));

        gridLayout->addWidget(uavFeedLabel, 1, 0, 1, 1);

        ugvMapLabel = new QLabel(gridLayoutWidget);
        ugvMapLabel->setObjectName(QString::fromUtf8("ugvMapLabel"));
        QSizePolicy sizePolicy1(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
        sizePolicy1.setHorizontalStretch(0);
        sizePolicy1.setVerticalStretch(0);
        sizePolicy1.setHeightForWidth(ugvMapLabel->sizePolicy().hasHeightForWidth());
        ugvMapLabel->setSizePolicy(sizePolicy1);

        gridLayout->addWidget(ugvMapLabel, 1, 3, 1, 1);

        horizontalLayout_4 = new QHBoxLayout();
        horizontalLayout_4->setSpacing(6);
        horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4"));
        label_2 = new QLabel(gridLayoutWidget);
        label_2->setObjectName(QString::fromUtf8("label_2"));

        horizontalLayout_4->addWidget(label_2);

        uavTakeoffLandButton = new QPushButton(gridLayoutWidget);
        uavTakeoffLandButton->setObjectName(QString::fromUtf8("uavTakeoffLandButton"));

        horizontalLayout_4->addWidget(uavTakeoffLandButton);


        gridLayout->addLayout(horizontalLayout_4, 2, 0, 1, 1);

        horizontalLayout_2 = new QHBoxLayout();
        horizontalLayout_2->setSpacing(6);
        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
        label = new QLabel(gridLayoutWidget);
        label->setObjectName(QString::fromUtf8("label"));

        horizontalLayout_2->addWidget(label);

        ugvSpeedLCD = new QLCDNumber(gridLayoutWidget);
        ugvSpeedLCD->setObjectName(QString::fromUtf8("ugvSpeedLCD"));
        ugvSpeedLCD->setFrameShape(QFrame::Box);

        horizontalLayout_2->addWidget(ugvSpeedLCD);


        gridLayout->addLayout(horizontalLayout_2, 4, 2, 1, 1);

        horizontalLayout_6 = new QHBoxLayout();
        horizontalLayout_6->setSpacing(6);
        horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6"));
        label_3 = new QLabel(gridLayoutWidget);
        label_3->setObjectName(QString::fromUtf8("label_3"));

        horizontalLayout_6->addWidget(label_3);

        ugvSpeakerButton = new QPushButton(gridLayoutWidget);
//.........这里部分代码省略.........
开发者ID:sauver,项目名称:sauver_sys,代码行数:101,代码来源:ui_main_window.hpp

示例3: resize


//.........这里部分代码省略.........
  mEdit->addAction(actEditRate);
  mEdit->addAction(actEditDmix);
  mEdit->addAction(actEditLADSPA);
  mEdit->addAction(actEditMeter);
  mEdit->addSeparator()->setText(tr("Format conversion"));
  mEdit->addAction(actEditLinear);
  mEdit->addAction(actEditFloat);
  mEdit->addAction(actEditIEC958);
  mEdit->addAction(actEditMuLaw);
  mEdit->addAction(actEditALaw);
  mEdit->addAction(actEditImaADPCM);
  
  mTools=menuBar()->addMenu(tr("&Tools"));
  mTools->addAction(actFileGenerate);
  mTools->addAction(actFileGeneratePart);
  mTools->addSeparator();
  mTools->addAction(actToolAllocate);
  
  mHelp=menuBar()->addMenu(tr("&Help"));
  mHelp->addAction(actHelpAbout);
  
  tbMain->addAction(actFileNew);
  tbMain->addAction(actFileOpen);
  tbMain->addAction(actFileSave);
  tbMain->addSeparator();
  tbMain->addAction(actFileGenerate);
  tbMain->addAction(actFileGeneratePart);
  tbMain->addSeparator();
  tbMain->addAction(actFileExit);
  
  tbTools->addAction(actEditHW);
  tbTools->addAction(actEditInp);
  tbTools->addAction(actEditNull);
  tbTools->addAction(actEditFile);
  tbTools->addSeparator();
  tbTools->addAction(actEditRoute);
  tbTools->addAction(actEditRate);
  tbTools->addAction(actEditDmix);
  tbTools->addAction(actEditLADSPA);
  tbTools->addAction(actEditMeter);
  tbTools->addSeparator();
  tbTools->addAction(actEditLinear);
  tbTools->addAction(actEditFloat);
  tbTools->addAction(actEditIEC958);
  tbTools->addAction(actEditMuLaw);
  tbTools->addAction(actEditALaw);
  tbTools->addAction(actEditImaADPCM);

  QStatusBar* statusbar = new QStatusBar(this);
  statusbar->setObjectName("statusbar");
  setStatusBar(statusbar);
  statusLabel=new QLabel(statusbar);
  statusbar->addWidget(statusLabel,100);

  scrollArea = new QScrollArea(this);
  scrollArea->setWidgetResizable(true);

  setCentralWidget(scrollArea);

  renderArea = new QRenderArea(scrollArea,scrollArea);
  scrollArea->setWidget(renderArea);

  programTitle=tr("ALSA Plugin Editor");
  workFile="";
  
  repaintTimer=0;
  deletedTimer=0;
  
  connect(actFileNew,SIGNAL(triggered()),this,SLOT(fileNew()));
  connect(actFileOpen,SIGNAL(triggered()),this,SLOT(fileOpen()));
  connect(actFileSave,SIGNAL(triggered()),this,SLOT(fileSave()));
  connect(actFileSaveAs,SIGNAL(triggered()),this,SLOT(fileSaveAs()));
  connect(actFileGenerate,SIGNAL(triggered()),this,SLOT(fileGenerate()));
  connect(actFileGeneratePart,SIGNAL(triggered()),this,SLOT(fileGeneratePart()));
  connect(actFileExit,SIGNAL(triggered()),this,SLOT(fileExit()));
  
  connect(actEditHW,SIGNAL(triggered()),this,SLOT(editHW()));
  connect(actEditInp,SIGNAL(triggered()),this,SLOT(editInp()));
  connect(actEditNull,SIGNAL(triggered()),this,SLOT(editNull()));
  connect(actEditFile,SIGNAL(triggered()),this,SLOT(editFile()));
  connect(actEditDmix,SIGNAL(triggered()),this,SLOT(editDmix()));
  connect(actEditRoute,SIGNAL(triggered()),this,SLOT(editRoute()));
  connect(actEditRate,SIGNAL(triggered()),this,SLOT(editRate()));
  connect(actEditLADSPA,SIGNAL(triggered()),this,SLOT(editLADSPA()));
  connect(actEditMeter,SIGNAL(triggered()),this,SLOT(editMeter()));
  connect(actEditLinear,SIGNAL(triggered()),this,SLOT(editLinear()));
  connect(actEditFloat,SIGNAL(triggered()),this,SLOT(editFloat()));
  connect(actEditIEC958,SIGNAL(triggered()),this,SLOT(editIEC958()));
  connect(actEditALaw,SIGNAL(triggered()),this,SLOT(editALaw()));
  connect(actEditMuLaw,SIGNAL(triggered()),this,SLOT(editMuLaw()));
  connect(actEditImaADPCM,SIGNAL(triggered()),this,SLOT(editImaADPCM()));
  
  connect(actToolAllocate,SIGNAL(triggered()),this,SLOT(toolAllocate()));
  connect(actHelpAbout,SIGNAL(triggered()),this,SLOT(helpAbout()));
  
  modified=false;
  updateStatus();
  
  srand(clock());
}
开发者ID:kernel1024,项目名称:aplugedit,代码行数:101,代码来源:mainwindow.cpp

示例4: SetupUI

void EditorMainWindow::SetupUI(QMainWindow *MainWindow) {

	setWindowIcon(*QtConfig::GetIcon("colorwheel.png"));

	MainWindow->setWindowTitle("Sound Engine v0.2.3");

	MainWindow->resize(1280, 720);

	MainWindow->setDockOptions(QMainWindow::AnimatedDocks |
								QMainWindow::AllowNestedDocks |
								QMainWindow::AllowTabbedDocks);

	MainWindow->setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::TabPosition::North);

	// ************************************************************************
	// Load styling

	ReloadStyleSheets();

	// ************************************************************************
	// File Picker

	auto *picker = new FilePicker();
	picker->setNameFilter("*.xml");
	GUI::Set(QT_INSTACE::FILE_PICKER, (void*) picker);

	// ************************************************************************
	// Menu Bar

	QMenuBar *menuBar = new QMenuBar(MainWindow);
	menuBar->setObjectName(QStringLiteral("menuBar"));
	menuBar->setGeometry(QRect(0, 0, 1051, 21));
	MainWindow->setMenuBar(menuBar);

	// Menu Entry
	{
		QMenu *menuEngine = new QMenu(menuBar);
		menuEngine->setObjectName(QStringLiteral("menuEngine"));
		menuEngine->setTitle("File");

		menuBar->addAction(menuEngine->menuAction());

		{
			QAction *action = new QAction(MainWindow);
			action->setText("Exit");
			action->setIcon(*QtConfig::GetIcon("power.png"));
			menuEngine->addAction(action);
			QObject::connect(action, &QAction::triggered, this, &EditorMainWindow::close);
		}

		{
			QAction *action = new QAction(MainWindow);
			action->setText("Save As...");
			action->setIcon(*QtConfig::GetIcon("memorycard.png"));
			menuEngine->addAction(action);

			QObject::connect(action, &QAction::triggered, this, [picker]() {
				picker->OpenForSave();
			});

			QObject::connect(picker, &QFileDialog::fileSelected, this, [picker] (const QString & file) {
				if (picker->IsSaving()) {
					CSoundEditor::GetScene()->SaveSceneAs(file.toStdString().c_str());
				}
			});
		}
	}

	// Menu Entry
	{
		QMenu *menu = new QMenu(menuBar);
		menu->setTitle("Scene");
		menuBar->addAction(menu->menuAction());

		// Submenu buttons
		QAction *action = new QAction(MainWindow);
		action->setText("Clear Scene");
		action->setIcon(*QtConfig::GetIcon("denied.png"));
		menu->addAction(action);

		QObject::connect(action, &QAction::triggered, this, []() {
			CSoundEditor::GetScene()->Clear();
			GUI::Get<SceneWindow>(QT_INSTACE::SCENE_EDITOR)->Clear();
		});
	}

	// Menu Entry
	{
		QMenu *menu = new QMenu(menuBar);
		menu->setTitle("Tools");
		menuBar->addAction(menu->menuAction());

		// Submenu buttons
		{
			QAction *action = new QAction(MainWindow);
			action->setText("Reload StyleSheets");
			action->setIcon(*QtConfig::GetIcon("cmyk.png"));
			menu->addAction(action);
			QObject::connect(action, &QAction::triggered, this, &EditorMainWindow::ReloadStyleSheets);
		}
//.........这里部分代码省略.........
开发者ID:ReDEnergy,项目名称:3DSound-Prototypying,代码行数:101,代码来源:EditorMainWindow.cpp

示例5: setupUi

    void setupUi(QMainWindow *MainWindow)
    {
        if (MainWindow->objectName().isEmpty())
            MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
        MainWindow->resize(999, 913);
        actionAbout = new QAction(MainWindow);
        actionAbout->setObjectName(QString::fromUtf8("actionAbout"));
        actionAtlas = new QAction(MainWindow);
        actionAtlas->setObjectName(QString::fromUtf8("actionAtlas"));
        actionMapping = new QAction(MainWindow);
        actionMapping->setObjectName(QString::fromUtf8("actionMapping"));
        actionLibrary = new QAction(MainWindow);
        actionLibrary->setObjectName(QString::fromUtf8("actionLibrary"));
        actionToolbox = new QAction(MainWindow);
        actionToolbox->setObjectName(QString::fromUtf8("actionToolbox"));
        centralwidget = new QWidget(MainWindow);
        centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
        gridLayout = new QGridLayout(centralwidget);
        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
        mainSizer = new QGridLayout();
        mainSizer->setObjectName(QString::fromUtf8("mainSizer"));
        mainSizer->setVerticalSpacing(14);
        mainSizer->setContentsMargins(0, -1, -1, -1);
        renderFrame = new QFrame(centralwidget);
        renderFrame->setObjectName(QString::fromUtf8("renderFrame"));
        renderFrame->setMinimumSize(QSize(800, 600));
        renderFrame->setFrameShape(QFrame::Box);
        renderFrame->setFrameShadow(QFrame::Raised);

        mainSizer->addWidget(renderFrame, 0, 0, 1, 1);


        gridLayout->addLayout(mainSizer, 0, 0, 1, 1);

        MainWindow->setCentralWidget(centralwidget);
        menubar = new QMenuBar(MainWindow);
        menubar->setObjectName(QString::fromUtf8("menubar"));
        menubar->setGeometry(QRect(0, 0, 999, 21));
        menuFile = new QMenu(menubar);
        menuFile->setObjectName(QString::fromUtf8("menuFile"));
        menuTools = new QMenu(menubar);
        menuTools->setObjectName(QString::fromUtf8("menuTools"));
        menuAbout = new QMenu(menubar);
        menuAbout->setObjectName(QString::fromUtf8("menuAbout"));
        menuWindows = new QMenu(menubar);
        menuWindows->setObjectName(QString::fromUtf8("menuWindows"));
        MainWindow->setMenuBar(menubar);
        statusbar = new QStatusBar(MainWindow);
        statusbar->setObjectName(QString::fromUtf8("statusbar"));
        MainWindow->setStatusBar(statusbar);

        menubar->addAction(menuFile->menuAction());
        menubar->addAction(menuTools->menuAction());
        menubar->addAction(menuWindows->menuAction());
        menubar->addAction(menuAbout->menuAction());
        menuTools->addAction(actionAtlas);
        menuTools->addAction(actionMapping);
        menuAbout->addAction(actionAbout);
        menuWindows->addAction(actionLibrary);
        menuWindows->addAction(actionToolbox);

        retranslateUi(MainWindow);

        QMetaObject::connectSlotsByName(MainWindow);
    } // setupUi
开发者ID:yevgeniy-logachev,项目名称:framework2d,代码行数:65,代码来源:ui_MainWindow.hpp


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