• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setCentralWidget函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setCentralWidget函数的典型用法代码示例。如果您正苦于以下问题:C++ setCentralWidget函数的具体用法?C++ setCentralWidget怎么用?C++ setCentralWidget使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: QMainWindow

PdfViewer::PdfViewer()
    : QMainWindow()
	, m_currentPage(0)
	, m_showMenuBar(false)
	, m_reloadTimer(0)
	, m_findWidget(0)
{
//QTime t = QTime::currentTime();
    setWindowTitle(QCoreApplication::applicationName());

	// set icon theme search paths
    QStringList themeSearchPaths;
    themeSearchPaths << QDir::homePath() + "/.local/share/icons/";
    themeSearchPaths << QIcon::themeSearchPaths();
    QIcon::setThemeSearchPaths(themeSearchPaths);

	// setup shortcut handler
#ifndef QT_NO_SHORTCUT
	ShortcutHandler *shortcutHandler = new ShortcutHandler(this);
#endif // QT_NO_SHORTCUT
	QSettings *settingsObject = new QSettings(this);
#ifndef QT_NO_SHORTCUT
	shortcutHandler->setSettingsObject(settingsObject);
#endif // QT_NO_SHORTCUT

	// setup recent files menu
	m_fileOpenRecentAction = new RecentFilesAction(Icon("document-open-recent"), tr("Open &Recent", "Action: open recent file"), this);
	m_fileOpenRecentAction->setSettingsObject(settingsObject);
	connect(m_fileOpenRecentAction, SIGNAL(fileSelected(QString)), this, SLOT(slotLoadDocument(QString)));

	// setup the main view
	m_pdfView = new PdfView(this);
	connect(m_pdfView, SIGNAL(scrollPositionChanged(qreal,int)), this, SLOT(slotViewScrollPositionChanged(qreal,int)));
	connect(m_pdfView, SIGNAL(openTexDocument(QString,int)), this, SLOT(slotOpenTexDocument(QString,int)));
	connect(m_pdfView, SIGNAL(mouseToolChanged(PdfView::MouseTool)), this, SLOT(slotSelectMouseTool(PdfView::MouseTool)));


	// setup the central widget
	QWidget *mainWidget = new QWidget(this);
	QVBoxLayout *mainLayout = new QVBoxLayout;
	mainLayout->addWidget(m_pdfView);
	mainLayout->setContentsMargins(0, 0, 0, 0);
	mainLayout->setSpacing(0);
	mainWidget->setLayout(mainLayout);
	setCentralWidget(mainWidget);

	createActions(); // must happen after the setup of m_pdfView
	QSettings settings;
	settings.beginGroup("MainWindow");
	m_showMenuBar = settings.value("ShowMenuBar", false).toBool();
	settings.endGroup();
	if (m_showMenuBar)
	{
		createMenus();
		createToolBars();
	}
	else
		createToolBarsWhenNoMenuBar();
	createDocks();

    Q_FOREACH(DocumentObserver *obs, m_observers) {
        obs->m_viewer = this;
    }

    // activate AA by default
    m_settingsTextAAAction->setChecked(true);
    m_settingsGfxAAAction->setChecked(true);

	// watch file changes
	m_watcher = new QFileSystemWatcher(this);
    // commented out by amkhlv:
    // connect(m_watcher, SIGNAL(fileChanged(QString)), this, SLOT(slotReloadWhenIdle(QString)));

	// setup presentation view (we must do this here in order to have access to the shortcuts)
	m_presentationWidget = new PresentationWidget;
	connect(m_presentationWidget, SIGNAL(pageChanged(int)), this, SLOT(slotGoToPage(int)));
	connect(m_presentationWidget, SIGNAL(doAction(Poppler::LinkAction::ActionType)), this, SLOT(slotDoAction(Poppler::LinkAction::ActionType)));

	readSettings();
	m_pdfView->setFocus();
//qCritical() << t.msecsTo(QTime::currentTime());
}
开发者ID:amkhlv,项目名称:pdfviewer,代码行数:82,代码来源:viewer.cpp


示例2: setWindowTitle


//.........这里部分代码省略.........
                    QKeySequence(QKeySequence::Close));
    menu->addAction(tr("&Save Copy As..."),
                    storeDialog_, SLOT(open()),
                    QKeySequence(QKeySequence::Save));
    menu->addAction(tr("&Revert Scene"),
                    this, SLOT(revert()));
    menu->addSeparator();
    menu->addAction(tr("&Quit"), this, SLOT(close()),
                    QKeySequence(tr("ctrl-Q")));

    // Signal mapper for display types
    signalMapper_ = new QSignalMapper(this);

    // Add display menu
    QAction * action;
    menu = menuBar()->addMenu(tr("&Output Mode"));

    action = menu->addAction(tr("&Fullscreen"),
                             this, SLOT(toggleFullscreen()),
                             QKeySequence(Qt::Key_F | Qt::CTRL));
    fsGlWidget_->addAction(action);

    menu->addSeparator();

    action = menu->addAction(tr("&Anaglyph"));
    action->setShortcut(QKeySequence(Qt::Key_1 | Qt::CTRL));
    connect(action, SIGNAL(triggered()), signalMapper_, SLOT(map()));
    signalMapper_->setMapping(action, GLWidget::anaglyph);
    fsGlWidget_->addAction(action);

    action = menu->addAction(tr("&Side by Side"));
    action->setShortcut(QKeySequence(Qt::Key_2 | Qt::CTRL));
    connect(action, SIGNAL(triggered()), signalMapper_, SLOT(map()));
    signalMapper_->setMapping(action, GLWidget::sidebyside);
    fsGlWidget_->addAction(action);

    action = menu->addAction(tr("&Line interlacing (Experimental)"));
    action->setShortcut(QKeySequence(Qt::Key_3 | Qt::CTRL));
    connect(action, SIGNAL(triggered()), signalMapper_, SLOT(map()));
    signalMapper_->setMapping(action, GLWidget::line);
    fsGlWidget_->addAction(action);

    action = menu->addAction(tr("Quad Buffering (Experimental)"));
    action->setShortcut(QKeySequence(Qt::Key_4 | Qt::CTRL));
    connect(action, SIGNAL(triggered()), signalMapper_, SLOT(map()));
    signalMapper_->setMapping(action, GLWidget::quad);
    fsGlWidget_->addAction(action);

    action = menu->addAction(tr("Matrix Anaglyph (Experimental)"));
    action->setShortcut(QKeySequence(Qt::Key_5 | Qt::CTRL));
    connect(action, SIGNAL(triggered()), signalMapper_, SLOT(map()));
    signalMapper_->setMapping(action, GLWidget::matrix);
    fsGlWidget_->addAction(action);

    menu->addSeparator();

    action = menu->addAction(tr("&Shader (Line interlacing)"));
    action->setShortcut(QKeySequence(Qt::Key_6 | Qt::CTRL));
    connect(action, SIGNAL(triggered()), signalMapper_, SLOT(map()));
    signalMapper_->setMapping(action, GLWidget::shaderLine);
    fsGlWidget_->addAction(action);

    action = menu->addAction(tr("&Shader (Mayan)"));
    action->setShortcut(QKeySequence(Qt::Key_7 | Qt::CTRL));
    connect(action, SIGNAL(triggered()), signalMapper_, SLOT(map()));
    signalMapper_->setMapping(action, GLWidget::shaderMayan);
    fsGlWidget_->addAction(action);

    menu->addSeparator();

    action = menu->addAction(tr("Si&ngle"));
    action->setShortcut(QKeySequence(Qt::Key_0 | Qt::CTRL));
    connect(action, SIGNAL(triggered()), signalMapper_, SLOT(map()));
    signalMapper_->setMapping(action, GLWidget::single);
    fsGlWidget_->addAction(action);

    connect(signalMapper_, SIGNAL(mapped(int)), this, SLOT(setDrawStyle(int)));

    // Object Creation Menu and signal mapper
    objectMenu_ = menuBar()->addMenu(tr("&Create Object"));
    objectMapper_ = new QSignalMapper(this);
    connect(objectMapper_, SIGNAL(mapped(int)), this, SLOT(onObjectCreate(int)));

#ifdef Q_WS_MACX
    // Make menu bar the default menu bar
    menuBar()->setParent(0);
#endif

    // Set up layout
    setFocusPolicy(Qt::StrongFocus);
    setCentralWidget(mainGlWidget_);

    // Create Scene
    setProgram(Program::create());

    // Set up redraw timer
    timer_ = new QTimer(this);
    connect(timer_, SIGNAL(timeout()), this, SLOT(onTimeout()));
    timer_->start(15); // ~60 fps
}
开发者ID:cbreak-black,项目名称:ExaminationRoom,代码行数:101,代码来源:mainwindow.cpp


示例3: QWidget

QucsFilter::QucsFilter()
{
  QWidget *centralWidget = new QWidget(this);  
  setCentralWidget(centralWidget);
  
  // set application icon
  setWindowIcon(QPixmap(":/bitmaps/big.qucs.xpm"));
  setWindowTitle("Qucs Filter " PACKAGE_VERSION);

  // --------  create menubar  -------------------
  QMenu *fileMenu = new QMenu(tr("&File"));

  QAction * fileQuit = new QAction(tr("E&xit"), this);
  fileQuit->setShortcut(Qt::CTRL+Qt::Key_Q);
  connect(fileQuit, SIGNAL(activated()), SLOT(slotQuit()));

  fileMenu->addAction(fileQuit);

  QMenu *helpMenu = new QMenu(tr("&Help"), this);
  QAction * helpHelp = new QAction(tr("Help..."), this);
  helpHelp->setShortcut(Qt::Key_F1);
  connect(helpHelp, SIGNAL(activated()), SLOT(slotHelpIntro()));

  QAction * helpAbout = new QAction(tr("&About QucsFilter..."), this);
  helpMenu->addAction(helpAbout);
  connect(helpAbout, SIGNAL(activated()), SLOT(slotHelpAbout()));

  QAction * helpAboutQt = new QAction(tr("About Qt..."), this);
  helpMenu->addAction(helpAboutQt);
  connect(helpAboutQt, SIGNAL(activated()), SLOT(slotHelpAboutQt()));

  helpMenu->addAction(helpHelp);
  helpMenu->addSeparator();
  helpMenu->addAction(helpAbout);
  helpMenu->addAction(helpAboutQt);

  menuBar()->addMenu(fileMenu);
  menuBar()->addSeparator();
  menuBar()->addMenu(helpMenu);

  // -------  create main windows widgets --------
  all  = new QGridLayout();
  all->setSpacing(3);

  // assign layout to central widget
  centralWidget->setLayout(all);

  // ...........................................................
  box1 = new QGroupBox(tr("Filter"), this);
  all->addWidget(box1,0,0);

  gbox1 = new QGridLayout();
  gbox1->setSpacing(3);

  box1->setLayout(gbox1);

  QLabel *Label0 = new QLabel(tr("Realization:"), this);
  gbox1->addWidget(Label0, 0,0);
  ComboRealize = new QComboBox(this);
  ComboRealize->addItem("LC ladder (pi type)");
  ComboRealize->addItem("LC ladder (tee type)");
  ComboRealize->addItem("C-coupled transmission lines");
  ComboRealize->addItem("Microstrip end-coupled");
  ComboRealize->addItem("Coupled transmission lines");
  ComboRealize->addItem("Coupled microstrip");
  ComboRealize->addItem("Stepped-impedance");
  ComboRealize->addItem("Stepped-impedance microstrip");
  ComboRealize->addItem("Quarter wave");
  ComboRealize->addItem("Quarter wave microstrip");
  ComboRealize->addItem("Equation-defined");

  gbox1->addWidget(ComboRealize, 0,1);
  connect(ComboRealize, SIGNAL(activated(int)), SLOT(slotRealizationChanged(int)));

  QLabel *Label1 = new QLabel(tr("Filter type:"), this);
  gbox1->addWidget(Label1, 1,0);
  ComboType = new QComboBox(this);
  ComboType->addItem("Bessel");
  ComboType->addItem("Butterworth");
  ComboType->addItem("Chebyshev");
  ComboType->addItem("Cauer");
  gbox1->addWidget(ComboType, 1,1);
  connect(ComboType, SIGNAL(activated(int)), SLOT(slotTypeChanged(int)));

  QLabel *Label2 = new QLabel(tr("Filter class:"), this);
  gbox1->addWidget(Label2, 2,0);
  ComboClass = new QComboBox(this);
  ComboClass->addItem(tr("Low pass"));
  ComboClass->addItem(tr("High pass"));
  ComboClass->addItem(tr("Band pass"));
  ComboClass->addItem(tr("Band stop"));
  gbox1->addWidget(ComboClass, 2,1);
  connect(ComboClass, SIGNAL(activated(int)), SLOT(slotClassChanged(int)));

  IntVal = new QIntValidator(1, 200, this);
  DoubleVal = new QDoubleValidator(this);

  LabelOrder = new QLabel(tr("Order:"), this);
  gbox1->addWidget(LabelOrder, 3,0);
  EditOrder = new QLineEdit("3", this);
//.........这里部分代码省略.........
开发者ID:FoxMarts,项目名称:qucs,代码行数:101,代码来源:qucsfilter.cpp


示例4: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent):
    QMainWindow(parent),
    clientModel(0),
    walletModel(0),
    encryptWalletAction(0),
    changePassphraseAction(0),
    aboutQtAction(0),
    trayIcon(0),
    notificator(0),
    rpcConsole(0)
{
    resize(850, 550);
    setWindowTitle(tr("Redcoin") + " - " + tr("Wallet"));
#ifndef Q_WS_MAC
    qApp->setWindowIcon(QIcon(":icons/bitcoin"));
    setWindowIcon(QIcon(":icons/bitcoin"));
#else
    setUnifiedTitleAndToolBarOnMac(true);
    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
#endif
    // Accept D&D of URIs
    setAcceptDrops(true);

    // Create actions for the toolbar, menu bar and tray/dock icon
    createActions();

    // Create application menu bar
    createMenuBar();

    // Create the toolbars
    createToolBars();

    // Create the tray icon (or setup the dock icon)
    createTrayIcon();

    // Create tabs
    overviewPage = new OverviewPage();

    miningPage = new MiningPage(this);

    transactionsPage = new QWidget(this);
    QVBoxLayout *vbox = new QVBoxLayout();
    transactionView = new TransactionView(this);
    vbox->addWidget(transactionView);
    transactionsPage->setLayout(vbox);

    addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);

    receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);

    sendCoinsPage = new SendCoinsDialog(this);

    signVerifyMessageDialog = new SignVerifyMessageDialog(this);

    centralWidget = new QStackedWidget(this);
    centralWidget->addWidget(overviewPage);
    centralWidget->addWidget(miningPage);
    centralWidget->addWidget(transactionsPage);
    centralWidget->addWidget(addressBookPage);
    centralWidget->addWidget(receiveCoinsPage);
    centralWidget->addWidget(sendCoinsPage);
#ifdef FIRST_CLASS_MESSAGING
    centralWidget->addWidget(signVerifyMessageDialog);
#endif
    setCentralWidget(centralWidget);

    // Create status bar
    statusBar();

    // Status bar notification icons
    QFrame *frameBlocks = new QFrame();
    frameBlocks->setContentsMargins(0,0,0,0);
    frameBlocks->setMinimumWidth(73);
    frameBlocks->setMaximumWidth(73);
    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
    frameBlocksLayout->setContentsMargins(3,0,3,0);
    frameBlocksLayout->setSpacing(3);
    labelEncryptionIcon = new QLabel();
    labelMiningIcon = new QLabel();
    labelConnectionsIcon = new QLabel();
    labelBlocksIcon = new QLabel();
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelEncryptionIcon);
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelMiningIcon);
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelConnectionsIcon);
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelBlocksIcon);
    frameBlocksLayout->addStretch();

    // Progress bar and label for blocks download
    progressBarLabel = new QLabel();
    progressBarLabel->setVisible(false);
    progressBar = new QProgressBar();
    progressBar->setAlignment(Qt::AlignCenter);
    progressBar->setVisible(false);

    statusBar()->addWidget(progressBarLabel);
    statusBar()->addWidget(progressBar);
//.........这里部分代码省略.........
开发者ID:CCPorg,项目名称:RED-RedCoin-Ver-603-Copy,代码行数:101,代码来源:bitcoingui.cpp


示例5: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent):
    QMainWindow(parent),
    clientModel(0),
    walletModel(0),
    encryptWalletAction(0),
    changePassphraseAction(0),
    aboutQtAction(0),
    trayIcon(0),
    notificator(0),
    rpcConsole(0)
{
    resize(850, 550);
    setWindowTitle(tr("Blackwhitecoin") + " - " + tr("Wallet"));
#ifndef Q_OS_MAC
    qApp->setWindowIcon(QIcon(":icons/bitcoin"));
    setWindowIcon(QIcon(":icons/bitcoin"));
#else
    setUnifiedTitleAndToolBarOnMac(true);
    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
#endif
    // Accept D&D of URIs
    setAcceptDrops(true);

    // Create actions for the toolbar, menu bar and tray/dock icon
    createActions();

    // Create application menu bar
    createMenuBar();

    // Create the toolbars
    createToolBars();

    // Create the tray icon (or setup the dock icon)
    createTrayIcon();

    // Create tabs
    overviewPage = new OverviewPage();

    transactionsPage = new QWidget(this);
    QVBoxLayout *vbox = new QVBoxLayout();
    transactionView = new TransactionView(this);
    vbox->addWidget(transactionView);
    transactionsPage->setLayout(vbox);

    addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);

    receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);

    sendCoinsPage = new SendCoinsDialog(this);

    signVerifyMessageDialog = new SignVerifyMessageDialog(this);

    centralWidget = new QStackedWidget(this);
    centralWidget->addWidget(overviewPage);
    centralWidget->addWidget(transactionsPage);
    centralWidget->addWidget(addressBookPage);
    centralWidget->addWidget(receiveCoinsPage);
    centralWidget->addWidget(sendCoinsPage);
    setCentralWidget(centralWidget);

    // Create status bar
    statusBar();

    // Status bar notification icons
    QFrame *frameBlocks = new QFrame();
    frameBlocks->setContentsMargins(0,0,0,0);
    frameBlocks->setMinimumWidth(56);
    frameBlocks->setMaximumWidth(56);
    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
    frameBlocksLayout->setContentsMargins(3,0,3,0);
    frameBlocksLayout->setSpacing(3);
    labelEncryptionIcon = new QLabel();
    labelConnectionsIcon = new QLabel();
    labelBlocksIcon = new QLabel();
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelEncryptionIcon);
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelConnectionsIcon);
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelBlocksIcon);
    frameBlocksLayout->addStretch();

    // Progress bar and label for blocks download
    progressBarLabel = new QLabel();
    progressBarLabel->setVisible(false);
    progressBar = new QProgressBar();
    progressBar->setAlignment(Qt::AlignCenter);
    progressBar->setVisible(false);

    // Override style sheet for progress bar for styles that have a segmented progress bar,
    // as they make the text unreadable (workaround for issue #1071)
    // See https://qt-project.org/doc/qt-4.8/gallery.html
    QString curStyle = qApp->style()->metaObject()->className();
    if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")
    {
        progressBar->setStyleSheet("QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #FF8000, stop: 1 orange); border-radius: 7px; margin: 0px; }");
    }

    statusBar()->addWidget(progressBarLabel);
    statusBar()->addWidget(progressBar);
//.........这里部分代码省略.........
开发者ID:blackwhitecoin,项目名称:Blackwhitecoin,代码行数:101,代码来源:bitcoingui.cpp


示例6: QMainWindow

//! [0]
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), completer(0), lineEdit(0)
{
    createMenu();

    QWidget *centralWidget = new QWidget;

    QLabel *modelLabel = new QLabel;
    modelLabel->setText(tr("Model"));

    modelCombo = new QComboBox;
    modelCombo->addItem(tr("QFileSytemModel"));
    modelCombo->addItem(tr("QFileSytemModel that shows full path"));
    modelCombo->addItem(tr("Country list"));
    modelCombo->addItem(tr("Word list"));
    modelCombo->setCurrentIndex(0);

    QLabel *modeLabel = new QLabel;
    modeLabel->setText(tr("Completion Mode"));
    modeCombo = new QComboBox;
    modeCombo->addItem(tr("Inline"));
    modeCombo->addItem(tr("Filtered Popup"));
    modeCombo->addItem(tr("Unfiltered Popup"));
    modeCombo->setCurrentIndex(1);

    QLabel *caseLabel = new QLabel;
    caseLabel->setText(tr("Case Sensitivity"));
    caseCombo = new QComboBox;
    caseCombo->addItem(tr("Case Insensitive"));
    caseCombo->addItem(tr("Case Sensitive"));
    caseCombo->setCurrentIndex(0);
//! [0]

//! [1]
    QLabel *maxVisibleLabel = new QLabel;
    maxVisibleLabel->setText(tr("Max Visible Items"));
    maxVisibleSpinBox = new QSpinBox;
    maxVisibleSpinBox->setRange(3,25);
    maxVisibleSpinBox->setValue(10);

    wrapCheckBox = new QCheckBox;
    wrapCheckBox->setText(tr("Wrap around completions"));
    wrapCheckBox->setChecked(true);
//! [1]

//! [2]
    contentsLabel = new QLabel;
    contentsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);

    connect(modelCombo, SIGNAL(activated(int)), this, SLOT(changeModel()));
    connect(modeCombo, SIGNAL(activated(int)), this, SLOT(changeMode(int)));
    connect(caseCombo, SIGNAL(activated(int)), this, SLOT(changeCase(int)));
    connect(maxVisibleSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changeMaxVisible(int)));
//! [2]

//! [3]
    lineEdit = new QLineEdit;

    QGridLayout *layout = new QGridLayout;
    layout->addWidget(modelLabel, 0, 0); layout->addWidget(modelCombo, 0, 1);
    layout->addWidget(modeLabel, 1, 0);  layout->addWidget(modeCombo, 1, 1);
    layout->addWidget(caseLabel, 2, 0);  layout->addWidget(caseCombo, 2, 1);
    layout->addWidget(maxVisibleLabel, 3, 0); layout->addWidget(maxVisibleSpinBox, 3, 1);
    layout->addWidget(wrapCheckBox, 4, 0);
    layout->addWidget(contentsLabel, 5, 0, 1, 2);
    layout->addWidget(lineEdit, 6, 0, 1, 2);
    centralWidget->setLayout(layout);
    setCentralWidget(centralWidget);

    changeModel();

    setWindowTitle(tr("Completer"));
    lineEdit->setFocus();
}
开发者ID:CodeDJ,项目名称:qt5-hidpi,代码行数:75,代码来源:mainwindow.cpp


示例7: QMainWindow

MainWindow::MainWindow(Application *app)
    : QMainWindow(),
      m_application(app)
{
    app->setMainWindow(this);
    setUnifiedTitleAndToolBarOnMac(true);
    setDocumentMode(true);

    QCoreApplication::setOrganizationName("Dunnart");
    QCoreApplication::setOrganizationDomain("dunnart.org");
    QCoreApplication::setApplicationName("Dunnart");

    // Correct the look of the tab bar on OS X cocoa.
    app->setStyleSheet(
        "QGraphicsView {"
            "border: 0px;"
        "}"
#ifdef Q_WS_MAC
        "QTabBar::tab:top {"
            "font-family: \"Lucida Grande\";"
            "font-size: 11px;"
        "}"
#endif
    );

    // Set the window title.
    setWindowTitle("Dunnart");

    m_tab_widget = new CanvasTabWidget(this);    
    connect(m_tab_widget, SIGNAL(currentCanvasChanged(Canvas*)),
            this, SLOT(canvasChanged(Canvas*)));
    connect(m_tab_widget, SIGNAL(currentCanvasFileInfoChanged(QFileInfo)),
            this, SLOT(canvasFileInfoChanged(QFileInfo)));
    m_tab_widget->newTab();
    setCentralWidget(m_tab_widget);
    app->setCanvasTabWidget(m_tab_widget);

    // Inital window size.
    resize(1020, 743);

    m_new_action = new QAction("New", this);
    m_new_action->setShortcut(QKeySequence::New);
    connect(m_new_action, SIGNAL(triggered()), this, SLOT(documentNew()));

    m_open_action = new QAction("Open...", this);
    m_open_action->setShortcut(QKeySequence::Open);
    connect(m_open_action, SIGNAL(triggered()), this, SLOT(documentOpen()));

    for (int i = 0; i < MAX_RECENT_FILES; ++i)
    {
        m_action_open_recent_file[i] = new QAction(this);
        m_action_open_recent_file[i]->setVisible(false);
        connect(m_action_open_recent_file[i], SIGNAL(triggered()),
                this, SLOT(documentOpenRecent()));
    }

    m_close_action = new QAction("Close", this);
    m_close_action->setShortcut(QKeySequence::Close);
    connect(m_close_action, SIGNAL(triggered()),
            m_tab_widget, SLOT(currentCanvasClose()));

    m_save_action = new QAction("Save", this);
    m_save_action->setShortcut(QKeySequence::Save);
    connect(m_save_action, SIGNAL(triggered()),
            m_tab_widget, SLOT(currentCanvasSave()));

    m_save_as_action = new QAction("Save As...", this);
    m_save_as_action->setShortcut(QKeySequence::SaveAs);
    connect(m_save_as_action, SIGNAL(triggered()),
            m_tab_widget, SLOT(currentCanvasSaveAs()));

    m_export_action = new QAction("Export...", this);
    connect(m_export_action, SIGNAL(triggered()), this, SLOT(documentExport()));

    m_print_action = new QAction("Print...", this);
    m_print_action->setShortcut(QKeySequence::Print);
    connect(m_print_action, SIGNAL(triggered()), this, SLOT(documentPrint()));

    m_quit_action = new QAction(tr("Quit"), this);
    m_quit_action->setShortcut(QKeySequence::Quit);
    connect(m_quit_action, SIGNAL(triggered()),
            this, SLOT(close()));

    m_about_action = new QAction(tr("About"), this);
    connect(m_about_action, SIGNAL(triggered()), this, SLOT(about()));

    m_homepage_action = new QAction(tr("Dunnart homepage"), this);
    connect(m_homepage_action, SIGNAL(triggered()), this, SLOT(openHomepage()));

    m_action_show_zoom_level_dialog = new QAction(
            tr("Zoom Level"), this);
    m_action_show_zoom_level_dialog->setCheckable(true);

    m_action_show_properties_editor_dialog = new QAction(
            tr("Properties Editor"), this);
    m_action_show_properties_editor_dialog->setCheckable(true);

    m_action_show_layout_properties_dialog = new QAction(
            tr("Layout Properties"), this);
    m_action_show_layout_properties_dialog->setCheckable(true);
//.........这里部分代码省略.........
开发者ID:skieffer,项目名称:ortho,代码行数:101,代码来源:mainwindow.cpp


示例8: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent):
    QMainWindow(parent),
    clientModel(0),
    walletModel(0),
    encryptWalletAction(0),
    changePassphraseAction(0),
    unlockWalletAction(0),
    lockWalletAction(0),
    aboutQtAction(0),
    trayIcon(0),
    notificator(0),
    rpcConsole(0),
    nWeight(0)
{
    setFixedSize(970, 550);
	QFontDatabase::addApplicationFont(":/fonts/Bebas");
    setWindowTitle(tr("Pentacoin") + " - " + tr("Wallet"));
	qApp->setStyleSheet("QMainWindow { background-image:url(:images/bkg);border:none; } #frame { } QToolBar QLabel { padding-top: 0px;padding-bottom: 0px;spacing: 10px;} QToolBar QLabel:item { padding-top: 0px;padding-bottom: 0px;spacing: 10px;} #spacer { background: transparent;border:none; } #toolbar2 { border:none;width:0px;hight:0px;padding-top:40px;padding-bottom:0px; background-color: transparent; } #labelMiningIcon { padding-left:5px;font-family:Century Gothic;width:100%;font-size:10px;text-align:center;color:black; } QMenu { background-color: qlineargradient(spread:pad, x1:0.511, y1:1, x2:0.482909, y2:0, stop:0 rgba(232,232,232), stop:1 rgba(232,232,232)); color: black; padding-bottom:10px; } QMenu::item { color: black; background: transparent; } QMenu::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgba(99,99,99,45), stop: 1 rgba(99,99,99,45)); } QMenuBar { background-color: white; color: white; } QMenuBar::item { font-size:12px;padding-bottom:3px;padding-top:3px;padding-left:15px;padding-right:15px;color: black; background-color: white; } QMenuBar::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgba(99,99,99,45), stop: 1 rgba(99,99,99,45)); }");
#ifndef Q_OS_MAC
    qApp->setWindowIcon(QIcon(":icons/bitcoin"));
    setWindowIcon(QIcon(":icons/bitcoin"));
#else
    setUnifiedTitleAndToolBarOnMac(true);
    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
#endif
    // Accept D&D of URIs
    setAcceptDrops(true);

    // Create actions for the toolbar, menu bar and tray/dock icon
    createActions();

    // Create application menu bar
    createMenuBar();

    // Create the toolbars
    createToolBars();

    // Create the tray icon (or setup the dock icon)
    createTrayIcon();

    // Create tabs
    overviewPage = new OverviewPage();

    transactionsPage = new QWidget(this);
    QVBoxLayout *vbox = new QVBoxLayout();
    transactionView = new TransactionView(this);
    vbox->addWidget(transactionView);
    transactionsPage->setLayout(vbox);

    addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);

    receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);

    sendCoinsPage = new SendCoinsDialog(this);

    signVerifyMessageDialog = new SignVerifyMessageDialog(this);
    masternodeManagerPage = new MasternodeManager(this);

    centralWidget = new QStackedWidget(this);
    centralWidget->addWidget(overviewPage);
    centralWidget->addWidget(transactionsPage);
    centralWidget->addWidget(addressBookPage);
    centralWidget->addWidget(receiveCoinsPage);
    centralWidget->addWidget(sendCoinsPage);
    centralWidget->addWidget(masternodeManagerPage);
    setCentralWidget(centralWidget);

    // Create status bar
    statusBar();

    // Status bar notification icons
    QFrame *frameBlocks = new QFrame();
    frameBlocks->setContentsMargins(0,0,0,0);
    frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
    frameBlocksLayout->setContentsMargins(3,0,3,0);
    frameBlocksLayout->setSpacing(3);
    labelEncryptionIcon = new QLabel();
    labelStakingIcon = new QLabel();
    labelConnectionsIcon = new QLabel();
    labelBlocksIcon = new QLabel();
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelEncryptionIcon);
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelStakingIcon);
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelConnectionsIcon);
    frameBlocksLayout->addStretch();
    frameBlocksLayout->addWidget(labelBlocksIcon);
    frameBlocksLayout->addStretch();

    if (GetBoolArg("-staking", true))
    {
        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);
        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));
        timerStakingIcon->start(30 * 1000);
        updateStakingIcon();
    }

    // Progress bar and label for blocks download
//.........这里部分代码省略.........
开发者ID:lin0sspice,项目名称:pentacoin,代码行数:101,代码来源:bitcoingui.cpp


示例9: QMainWindow

BitcoinGUI::BitcoinGUI(QWidget *parent):
    QMainWindow(parent),
    clientModel(0),
    walletModel(0),
    encryptWalletAction(0),
    changePassphraseAction(0),
    unlockWalletAction(0),
    lockWalletAction(0),
    aboutQtAction(0),
    trayIcon(0),
    notificator(0),
    rpcConsole(0)
{
    resize(840, 550);
    setWindowTitle(tr("Global ") + tr("Wallet"));


#ifndef Q_OS_MAC
    qApp->setWindowIcon(QIcon(":icons/bitcoin"));
    setWindowIcon(QIcon(":icons/bitcoin"));
#else
    setUnifiedTitleAndToolBarOnMac(true);
    QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
#endif
	QApplication::setStyle(QStyleFactory::create("Fusion"));

    // Accept D&D of URIs
    setAcceptDrops(true);

    // Create actions for the toolbar, menu bar and tray/dock icon
    createActions();

    // Create application menu bar
    createMenuBar();

    // Create the toolbars
    createToolBars();

    // Create the tray icon (or setup the dock icon)
    createTrayIcon();
//    QFile style(":/styles/styles");
//    style.open(QFile::ReadOnly);
//    qApp->setStyleSheet(QString::fromUtf8(style.readAll()));
//    setStyleSheet("QMainWindow { background-image:url(:images/bkg);border:none;font-family:'Open Sans,sans-serif'; } #frame { } QToolBar QLabel { padding-top:15px;padding-bottom:10px;margin:0px; } #spacer { background:rgb(210,192,123);border:none; } #toolbar3 { border:none;width:1px; background-color: rgb(63,109,186); } #toolbar2 { border:none;width:28px; background-color:qlineargradient(x1: 0, y1: 0, x2: 2, y2: 2,stop: 0 rgb(210,192,123), stop: 1 rgb(227,213,195),stop: 2 rgb(59,62,65)); } #toolbar { border:none;height:100%;padding-top:20px; background: rgb(210,192,123); text-align: left; color: white;min-width:150px;max-width:150px;} QToolBar QToolButton:hover {background-color:qlineargradient(x1: 0, y1: 0, x2: 2, y2: 2,stop: 0 rgb(210,192,123), stop: 1 rgb(227,213,195),stop: 2 rgb(59,62,65));} QToolBar QToolButton { font-family:Century Gothic;padding-left:20px;padding-right:150px;padding-top:10px;padding-bottom:10px; width:100%; color: white; text-align: left; background-color: rgb(210,192,123) } #labelMiningIcon { padding-left:5px;font-family:Century Gothic;width:100%;font-size:10px;text-align:center;color:white; } QMenu { background: rgb(210,192,123); color:white; padding-bottom:10px; } QMenu::item { color:white; background-color: transparent; } QMenu::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(210,192,123), stop: 1 rgb(227,213,195)); } QMenuBar { background: rgb(210,192,123); color:white; } QMenuBar::item { font-size:12px;padding-bottom:8px;padding-top:8px;padding-left:15px;padding-right:15px;color:white; background-color: transparent; } QMenuBar::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(210,192,123), stop: 1 rgb(227,213,195)); }");
    qApp->setStyleSheet("QMainWindow { background-image:url(:images/bkg);border:none;font-family:'Open Sans,sans-serif'; } #frame { } QToolBar QLabel { padding-top:15px;padding-bottom:10px;margin:0px; } #spacer { background:rgb(63,109,186);border:none; } #toolbar3 { border:none;width:1px; background-color: rgb(63,109,186); } #toolbar2 { border:none;width:28px; background-color:rgb(63,109,186); } #toolbar { border:none;height:100%;padding-top:20px; background: rgb(63,109,186); text-align: left; color: white;min-width:150px;max-width:150px;} QToolBar QToolButton:hover {background-color:qlineargradient(x1: 0, y1: 0, x2: 2, y2: 2,stop: 0 rgb(63,109,186), stop: 1 rgb(216,252,251),stop: 2 rgb(59,62,65));} QToolBar QToolButton { font-family:Century Gothic;padding-left:20px;padding-right:150px;padding-top:10px;padding-bottom:10px; width:100%; color: white; text-align: left; background-color: rgb(63,109,186) } #labelMiningIcon { padding-left:5px;font-family:Century Gothic;width:100%;font-size:10px;text-align:center;color:white; } QMenu { background: rgb(63,109,186); color:white; padding-bottom:10px; } QMenu::item { color:white; background-color: transparent; } QMenu::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(63,109,186), stop: 1 rgb(149,204,244)); } QMenuBar { background: rgb(63,109,186); color:white; } QMenuBar::item { font-size:12px;padding-bottom:8px;padding-top:8px;padding-left:15px;padding-right:15px;color:white; background-color: transparent; } QMenuBar::item:selected { background-color:qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5,stop: 0 rgb(63,109,186), stop: 1 rgb(149,204,244)); }");


//#ifdef Q_OS_MAC
//    toolbar->setStyleSheet("QToolBar { background-color: transparent; border: 0px solid black; padding: 3px; }");
//#endif
    // Create tabs
    overviewPage = new OverviewPage();

    transactionsPage = new QWidget(this);
    QVBoxLayout *vbox = new QVBoxLayout();
    transactionView = new TransactionView(this);
    vbox->addWidget(transactionView);
    transactionsPage->setLayout(vbox);

    addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);

    receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);

    sendCoinsPage = new SendCoinsDialog(this);

    signVerifyMessageDialog = new SignVerifyMessageDialog(this);

    centralWidget = new QStackedWidget(this);
    centralWidget->addWidget(overviewPage);
    centralWidget->addWidget(transactionsPage);
    centralWidget->addWidget(addressBookPage);
    centralWidget->addWidget(receiveCoinsPage);
    centralWidget->addWidget(sendCoinsPage);
    setCentralWidget(centralWidget);

    // Create status bar
    statusBar();

    // Status bar notification icons

    labelEncryptionIcon = new QLabel();
    labelStakingIcon = new QLabel();
    labelConnectionsIcon = new QLabel();
    labelBlocksIcon = new QLabel();

    if (GetBoolArg("-staking", true))
    {
        QTimer *timerStakingIcon = new QTimer(labelStakingIcon);
        connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon()));
        timerStakingIcon->start(30 * 1000);
        updateStakingIcon();
    }

    // Progress bar and label for blocks download
    progressBarLabel = new QLabel();
    progressBarLabel->setVisible(false);
    progressBar = new QProgressBar();


    progressBar->setAlignment(Qt::AlignCenter);
//.........这里部分代码省略.........
开发者ID:crowetic,项目名称:global-master,代码行数:101,代码来源:bitcoingui.cpp


示例10: createAction

void MainWindow::initGui(){
    this->setWindowTitle("Framework for empirical virtual agent studies");
    vGroup = new QGroupBox;
    vlayout = new QVBoxLayout;
    createAction();
    menu = new QMenuBar();
    fileMenu = new QMenu(tr("&Datei"), this);
    fileMenu->addAction(openAct);
    fileMenu->addAction(exitAct);
    menu->addMenu(fileMenu);
    extraMenu = new QMenu(tr("&Extras"), this);
    //extraMenu->addAction(loggerAct);
    menu->addMenu(extraMenu);
    logMenu = new QMenu(tr("&Logging"), this);
    extraMenu->addMenu(logMenu);
    logMenu->addAction(noLog);
    logMenu->addAction(logToConsole);
    logMenu->addAction(logToFile);

    QSize pixMapSize(80,50);
    QPixmap image(pixMapSize);

    developerPath = std::getenv("WBS_DEVELOPER_ROOT");

    image.load(developerPath + "/projects/StateMachine/image.bmp");
    //QPixmap image();
    label = new QLabel();
    label->setPixmap(image);
    hlayout = new QHBoxLayout();

    agentAdapterLabel = new QLabel("Select Agent Adapter");
    agentAdapterCombo = new QComboBox;
    agentAdapterCombo->setEnabled(false);
    agentAdaperBox = new QGroupBox(tr("Select Agent Adapter"));
    agentAdapterLayout = new QVBoxLayout;
    agentAdapterLayout->addWidget(agentAdapterCombo);
    startAgent = new QCheckBox("Start the agent");
    startAgent->setEnabled(false);
    agentAdapterLayout->addWidget(startAgent);
    agentAdaperBox->setLayout(agentAdapterLayout);

    MainWindow::firstUseBox = new QCheckBox("Nehmen Sie erste mal teil?");
    MainWindow::loadExistingProfile = new QPushButton("Profil laden");
    MainWindow::createSm = new QPushButton("execute state machine");
    MainWindow::loadSm = new QPushButton("load state machine");
    MainWindow::loadDataFile = new QPushButton("load Datafile");
    MainWindow::loadUtteranceFile = new QPushButton("load utterance file");

    loadLayout = new QVBoxLayout;
    loadBox = new QGroupBox(tr("Load Files"));
    loadLayout->addWidget(loadSm);
    //vlayout->addWidget(firstUseBox);
    firstUseBox->setEnabled(false);
    loadLayout->addWidget(loadUtteranceFile);
    loadUtteranceFile->setEnabled(false);
    loadLayout->addWidget(loadDataFile);
    loadBox->setLayout(loadLayout);
    vlayout->addWidget(loadBox);
    vlayout->addWidget(agentAdaperBox);

    startLayout = new QVBoxLayout;
    startLayout->addWidget(createSm);
    startBox = new QGroupBox(tr("Start StateMachine"));
    startBox->setLayout(startLayout);
    vlayout->addWidget(startBox);
    vlayout->addSpacing(30);
    //TODO:for testing onlay
    //vlayout->addLayout(testLayout);
    vlayout->addWidget(quit);
    createSm->setEnabled(false);
    loadDataFile->setEnabled(false);
    hlayout->addWidget(label);
    hlayout->addLayout(vlayout);
    vGroup->setLayout(hlayout);

    setCentralWidget(vGroup);
    this->show();
}
开发者ID:OlliD,项目名称:StateMachine,代码行数:78,代码来源:mainwindow.cpp


示例11: QMainWindow


//.........这里部分代码省略.........
      Awl::PitchLabel* pl = new Awl::PitchLabel();
      pl->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
      tb->addWidget(pl);

      tb->addSeparator();
      tb->addWidget(new QLabel(tr("Velocity:")));
      veloType = new QComboBox;
      veloType->addItem(tr("offset"), MScore::OFFSET_VAL);
      veloType->addItem(tr("user"),   MScore::USER_VAL);
      tb->addWidget(veloType);

      velocity = new QSpinBox;
      velocity->setRange(-1, 127);
      velocity->setSpecialValueText("--");
      velocity->setReadOnly(true);
      tb->addWidget(velocity);

      tb->addWidget(new QLabel(tr("Pitch:")));
      pitch = new Awl::PitchEdit;
      pitch->setReadOnly(true);
      tb->addWidget(pitch);

      //-------------
      qreal xmag = .1;
      ruler = new Ruler;
      ruler->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
      ruler->setFixedHeight(rulerHeight);

      ruler->setMag(xmag, 1.0);

      Piano* piano = new Piano;
      piano->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
      piano->setFixedWidth(pianoWidth);

      gv  = new PianoView;
      gv->scale(xmag, 1.0);
      gv->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
      gv->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

      hsb = new QScrollBar(Qt::Horizontal);
      connect(gv->horizontalScrollBar(), SIGNAL(rangeChanged(int,int)),
         SLOT(rangeChanged(int,int)));

      // layout
      QHBoxLayout* hbox = new QHBoxLayout;
      hbox->setSpacing(0);
      hbox->addWidget(piano);
      hbox->addWidget(gv);

      split = new QSplitter(Qt::Vertical);
      split->setFrameShape(QFrame::NoFrame);

      QWidget* split1 = new QWidget;      // piano - pianoview
      split1->setLayout(hbox);
      split->addWidget(split1);

      QGridLayout* layout = new QGridLayout;
      layout->setContentsMargins(0, 0, 0, 0);
      layout->setSpacing(0);
      layout->setColumnMinimumWidth(0, pianoWidth + 5);
      layout->addWidget(tb,    0, 0, 1, 2);
      layout->addWidget(ruler, 1, 1);
      layout->addWidget(split, 2, 0, 1, 2);
      layout->addWidget(hsb,   3, 1);

      mainWidget->setLayout(layout);
      setCentralWidget(mainWidget);

      connect(gv->verticalScrollBar(), SIGNAL(valueChanged(int)), piano, SLOT(setYpos(int)));

      connect(gv,          SIGNAL(magChanged(double,double)),  ruler, SLOT(setMag(double,double)));
      connect(gv,          SIGNAL(magChanged(double,double)),  piano, SLOT(setMag(double,double)));
      connect(gv,          SIGNAL(pitchChanged(int)),          pl,    SLOT(setPitch(int)));
      connect(gv,          SIGNAL(pitchChanged(int)),          piano, SLOT(setPitch(int)));
      connect(piano,       SIGNAL(pitchChanged(int)),          pl,    SLOT(setPitch(int)));
      connect(gv,          SIGNAL(posChanged(const Pos&)),     pos,   SLOT(setValue(const Pos&)));
      connect(gv,          SIGNAL(posChanged(const Pos&)),     ruler, SLOT(setPos(const Pos&)));
      connect(ruler,       SIGNAL(posChanged(const Pos&)),     pos,   SLOT(setValue(const Pos&)));

      connect(hsb,         SIGNAL(valueChanged(int)),  SLOT(setXpos(int)));
      connect(gv,          SIGNAL(xposChanged(int)),   SLOT(setXpos(int)));
      connect(gv->horizontalScrollBar(), SIGNAL(valueChanged(int)), SLOT(setXpos(int)));

      connect(ruler,       SIGNAL(locatorMoved(int, const Pos&)), SLOT(moveLocator(int, const Pos&)));
      connect(veloType,    SIGNAL(activated(int)),     SLOT(veloTypeChanged(int)));
      connect(velocity,    SIGNAL(valueChanged(int)),  SLOT(velocityChanged(int)));
      connect(gv->scene(), SIGNAL(selectionChanged()), SLOT(selectionChanged()));
      connect(piano,       SIGNAL(keyPressed(int)),    SLOT(keyPressed(int)));
      connect(piano,       SIGNAL(keyReleased(int)),   SLOT(keyReleased(int)));
      resize(800, 400);

      QActionGroup* ag = new QActionGroup(this);
      QAction* a = new QAction(this);
      a->setData("delete");
      a->setShortcut(Qt::Key_Delete);
      ag->addAction(a);
      addActions(ag->actions());
      connect(ag, SIGNAL(triggered(QAction*)), SLOT(cmd(QAction*)));
      setXpos(0);
      }
开发者ID:33akash,项目名称:MuseScore,代码行数:101,代码来源:pianoroll.cpp


示例12: QuasarWindow

SequenceNumber::SequenceNumber(MainWindow* main)
    : QuasarWindow(main, "SequenceNumber")
{
    _helpSource = "seq_number.html";

    QFrame* frame = new QFrame(this);
    QScrollView* sv = new QScrollView(frame);
    _nums = new QButtonGroup(4, Horizontal, tr("Seq Numbers"), sv->viewport());

    new QLabel("Type", _nums);
    new QLabel("Minimum", _nums);
    new QLabel("Maximum", _nums);
    new QLabel("Next", _nums);

    addIdEdit(tr("Data Object:"), "data_object", "object_id");
    addIdEdit(tr("Journal Entry:"), "gltx", "Journal Entry");
    addIdEdit(tr("Ledger Transfer:"), "gltx", "Ledger Transfer");
    addIdEdit(tr("Card Adjustment:"), "gltx", "Card Adjustment");
    addIdEdit(tr("Customer Invoice:"), "gltx", "Customer Invoice");
    addIdEdit(tr("Customer Return:"), "gltx", "Customer Return");
    addIdEdit(tr("Customer Payment:"), "gltx", "Customer Payment");
    addIdEdit(tr("Customer Quote:"), "quote", "number");
    addIdEdit(tr("Vendor Invoice:"), "gltx", "Vendor Invoice");
    addIdEdit(tr("Vendor Claim:"), "gltx", "Vendor Claim");
    addIdEdit(tr("Purchase Order:"), "porder", "number");
    addIdEdit(tr("Packing Slip:"), "slip", "number");
    addIdEdit(tr("Nosale:"), "gltx", "Nosale");
    addIdEdit(tr("Payout:"), "gltx", "Payout");
    addIdEdit(tr("Withdraw:"), "gltx", "Withdraw");
    addIdEdit(tr("Shift:"), "gltx", "Shift");
    addIdEdit(tr("Item Adjustment:"), "gltx", "Item Adjustment");
    addIdEdit(tr("Item Transfer:"), "gltx", "Item Transfer");
    addIdEdit(tr("Physical Count:"), "pcount", "number");
    addIdEdit(tr("Label Batch:"), "label_batch", "number");
    addIdEdit(tr("Price Batch:"), "price_batch", "number");
    addIdEdit(tr("Promo Batch:"), "promo_batch", "number");
    addIdEdit(tr("Company Number:"), "company", "number");
    addIdEdit(tr("Store Number:"), "store", "number");
    addIdEdit(tr("Station Number:"), "station", "number");
    addIdEdit(tr("Tender Count #:"), "tender_count", "number");
    addIdEdit(tr("Tender Menu #:"), "tender", "menu_num");

    QFrame* buttons = new QFrame(frame);
    QPushButton* ok = new QPushButton(tr("&OK"), buttons);
    QPushButton* quit = new QPushButton(tr("&Close"), buttons) 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setChanged函数代码示例发布时间:2022-05-30
下一篇:
C++ setCascadeColorEnabled函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap