//! [1] MainWindow::MainWindow() //! [1] //! [2] { textEdit = new QPlainTextEdit; setCentralWidget(textEdit); createActions(); createMenus(); createToolBars(); createStatusBar(); readSettings(); connect(textEdit->document(), SIGNAL(contentsChanged()), this, SLOT(documentWasModified())); setCurrentFile(""); setUnifiedTitleAndToolBarOnMac(true); }
MainWindow::MainWindow(){ // Calls the functions that creates the widgets for the stack, menu bar, menu bar actions, & status bar createMainWindowMenu(); createGameWidget(); createActions(); createMenus(); createStatusBar(); // Creates a stacked widget as the central widget that holds the menu and game widgets stack = new QStackedWidget(); stack->addWidget(menuWidget); stack->addWidget(gameWidget); setCentralWidget(stack) ; // Sets the title, background, & window size setWindowTitle(tr("Brick Break")); setStyleSheet("QMainWindow{background-image:url(:/Resource/images/Background.png)}"); setFixedSize(600,450); }
PlaYUVerApp::PlaYUVerApp() : m_pcCurrentSubWindow( NULL ), m_pcCurrentVideoSubWindow( NULL ), m_pcAboutDialog( NULL ) { setWindowModality( Qt::ApplicationModal ); setWindowModality( Qt::NonModal ); // DBus #ifdef USE_QTDBUS m_pDBusAdaptor = new PlaYUVerAppAdaptor( this ); #endif m_pcWindowHandle = new PlaYUVerSubWindowHandle( this ); m_appModuleVideo = new VideoHandle( this, m_pcWindowHandle ); m_appModuleQuality = new QualityHandle( this, m_pcWindowHandle ); m_appModuleExtensions = new ModulesHandle( this, m_pcWindowHandle, m_appModuleVideo ); createActions(); createToolBars(); createDockWidgets(); createMenus(); createStatusBar(); updateMenus(); readSettings(); setWindowTitle( QApplication::applicationName() ); setWindowIcon( QIcon( ":/images/playuver.png" ) ); setUnifiedTitleAndToolBarOnMac( true ); setCentralWidget( m_pcWindowHandle ); setAcceptDrops( true ); setBackgroundRole( QPalette::Background ); connect( m_pcWindowHandle, SIGNAL( windowActivated() ), this, SLOT( update() ) ); connect( m_pcWindowHandle, SIGNAL( changed() ), this, SLOT( update() ) ); connect( m_appModuleVideo, SIGNAL( changed() ), this, SLOT( update() ) ); connect( m_appModuleQuality, SIGNAL( changed() ), this, SLOT( update() ) ); connect( m_appModuleExtensions, SIGNAL( changed() ), this, SLOT( update() ) ); }
SampleEditor::SampleEditor(QWidget * parent, Qt::WindowFlags flags) : QMainWindow(parent,flags) { table = new TableWindow(); plot = new PlotWindow(this); histo = new HistoWindow(this); //graph = new GraphWindow(this); dendro1 = new Dendrogram(this); dendro2 = new Dendrogram(this); heatmap = new Heatmap(this); biheatmap = new BiHeatmap(this); spdMSTWin = NULL; spdkNNGWin = NULL; //progressionheatmap = new ProgressionHeatmap(this); this->cc1 = NULL; this->cc2 = NULL; data = NULL; data = vtkSmartPointer<vtkTable>::New(); //Start with a new table selection = new ObjectSelection(); selection2 = new ObjectSelection(); lastPath = "."; createMenus(); createStatusBar(); this->flag = 0; setCentralWidget(table); setWindowTitle(tr("Sample Editor")); connect(selection, SIGNAL(changed()), this, SLOT(updateStatistics())); this->ClusterSelections = new SelectiveClustering(); //this->SampleClusterManager = new ClusterManager(); //this->SampleClusterManager->setClusteringModel(this->ClusterSelections ); //this->SampleClusterManager->setObjectSelection(selection); //this->SampleClusterManager->setVisible(true); this->resize(500,500); }
void PEditor::init() { setWindowIcon(QIcon(":/pi_icon.png")); env = new Environment(this); pi = new ProgInfo("."); doc = new DocViewer(); lineNumbering = true; tabWidget = new TabWidget(this); connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(switchToTab(int))); setCentralWidget(tabWidget); setFocusProxy(tabWidget); // textEdit = new TextEditWidget(tabWidget); textEdit = 0; createActions(); connect(tabWidget, SIGNAL(contextMenuAt(const QPoint &, int)), this, SLOT(showContextMenu(const QPoint &, int))); // The file actions are needed for showContextMenu(). createMenus(); createToolBars(); createStatusBar(); createDockWindows(); connect(env, SIGNAL(canCompileChanged(bool)), this, SLOT(canCompileChanged(bool))); // This should be placed after createActions(); if (env->getCanCompile()) enableCLActs(); else disableCLActs(); tabCloseButton = new QToolButton(this); tabCloseButton->setDefaultAction(tabCloseAction); tabWidget->setCornerWidget(tabCloseButton); connect(tabCloseButton, SIGNAL(clicked()), this, SLOT(removeTab())); readSettings(); openProgFunc(progName); }
/*! */ DebugMessageWindow::DebugMessageWindow( QWidget * parent, MainData & main_data ) : QMainWindow( parent ) , M_main_data( main_data ) { this->setWindowTitle( tr( "Debug Message" ) ); int i = -1; M_debug_text[++i] = tr( "System" ); M_debug_text[++i] = tr( "Sensor" ); M_debug_text[++i] = tr( "WM" ); M_debug_text[++i] = tr( "Action" ); M_debug_text[++i] = tr( "Intercept" ); M_debug_text[++i] = tr( "Kick" ); M_debug_text[++i] = tr( "Hold" ); M_debug_text[++i] = tr( "Dribble" ); M_debug_text[++i] = tr( "Pass" ); M_debug_text[++i] = tr( "Cross" ); M_debug_text[++i] = tr( "Shoot" ); M_debug_text[++i] = tr( "Clear" ); M_debug_text[++i] = tr( "Block" ); M_debug_text[++i] = tr( "Mark" ); M_debug_text[++i] = tr( "Position" ); M_debug_text[++i] = tr( "Role" ); M_debug_text[++i] = tr( "Plan" ); M_debug_text[++i] = tr( "Team" ); M_debug_text[++i] = tr( "Comm" ); M_debug_text[++i] = tr( "Analyzer" ); M_debug_text[++i] = tr( "ActChain" ); createActions(); createMenus(); createWindows(); readSettings(); this->resize( 800, 800 ); #ifndef Q_WS_MAC this->setWindowFlags( this->windowFlags() | Qt::WindowStaysOnTopHint ); #endif }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { QWidget *widget = new QWidget; setCentralWidget(widget); QWidget *topFiller = new QWidget; topFiller->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); infoLabel = new QLabel(tr("<i>Choose a menu option, or right-click to " "invoke a context menu</i>")); infoLabel->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); infoLabel->setAlignment(Qt::AlignCenter); textbrowser = new QTextBrowser(); textbrowser->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); textbrowser->setAlignment(Qt::AlignLeft); QWidget *bottomFiller = new QWidget; bottomFiller->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); QVBoxLayout *layout = new QVBoxLayout; layout->setMargin(5); layout->addWidget(topFiller); layout->addWidget(textbrowser); layout->addWidget(infoLabel); layout->addWidget(bottomFiller); widget->setLayout(layout); createActions(); createMenus(); QString message = tr("A context menu is available by right-clicking"); statusBar()->showMessage(message); setWindowTitle(tr("Menus")); setMinimumSize(160, 160); resize(480, 320); }
Window::Window(const QString & inAudioFileName) { mainWidget = new QWidget(); setCentralWidget(mainWidget); glWidget = new GLWidget(inAudioFileName); glWidget->setMinimumSize(500,500); glWidget->setMaximumSize(500,500); createActions(); createMenus(); // A play/pause button playpause_button = new QPushButton(tr("Play/Pause")); // Connect a click signal on the go button to a slot to start the rotation time connect(playpause_button, SIGNAL(clicked()), glWidget, SLOT(playPause())); // A main layout to hold everything QHBoxLayout *layout = new QHBoxLayout; // The OpenGL window and the sliders to move it interactively QVBoxLayout *gl_layout = new QVBoxLayout; gl_layout->addWidget(glWidget); // Controls for the animation QVBoxLayout *buttons_layout = new QVBoxLayout; // buttons_layout->addWidget(powerSpectrumModeLabel); // buttons_layout->addWidget(powerSpectrumModeCombo); buttons_layout->addWidget(playpause_button); gl_layout->addLayout(buttons_layout); layout->addLayout(gl_layout); // Set the layout for this widget to the layout we just created mainWidget->setLayout(layout); setWindowTitle(tr("MarSndPeek")); }
Flipp::Flipp(QWidget *parent) : QMainWindow(parent) { connections = new QList<ConnectionUnit*>; connectionListWidget = new ConnectionListWidget(this, connections); terminals = new TerminalListWidget(this); parsers = new QList<ParserUnit*>; parserListWidget = new ParserListWidget(this, parsers); linkers = new QList<LinkerUnit*>; linkerListWidget = new LinkerListWidget(this, linkers); // plotter = new PlotterWidget(this,linkers); plotter = new PlotterWidget(linkers); // thread = new QThread; // plotter->moveToThread(thread); // thread->start(); // plotter = new PlotterWidget(this); m_sSettingsFile = QApplication::applicationDirPath() + "/lastSettings.flp"; setCentralWidget(plotter); createDocks(); createMenus(); this->setWindowTitle(tr("f l i p p")); QFile qss("../flipp/styles/flipp.css"); qss.open(QFile::ReadOnly); setStyleSheet(qss.readAll()); qss.close(); connect(connectionListWidget,SIGNAL(connectionListChanged(QStringList)),terminals,SLOT(updateConnections(QStringList))); connect(connectionListWidget,SIGNAL(connectionListChanged(QStringList)),linkerListWidget,SLOT(updateConnections(QStringList))); connect(terminals,SIGNAL(terminalRequest(TerminalWidget*,QString)),this,SLOT(handleTerminalRequest(TerminalWidget*,QString))); connect(parserListWidget,SIGNAL(parserListChanged(QStringList)),linkerListWidget,SLOT(updateParsers(QStringList))); connect(linkerListWidget,SIGNAL(linkerConnectionRequest(LinkerUnit*,QString)),this,SLOT(handleLinkerConnectionRequest(LinkerUnit*, QString))); connect(linkerListWidget,SIGNAL(linkerParserRequest(LinkerUnit*,QString)),this,SLOT(handleLinkerParserRequest(LinkerUnit*, QString))); connect(linkerListWidget,SIGNAL(linkerListChanged()),plotter,SLOT(updateLinkerList())); restoreSettings(); }
ImageViewer::ImageViewer(Image img2, QImage image, QString title, QWidget *parent):QMainWindow(parent) { this->img = new Image(); img->setBlue(img2.getBlue()); img->setGraysScale(img2.getGraysScale()); img->setGreen(img2.getGreen()); img->setHeight(img2.getHeight()); img->setLevel(img2.getLevel()); img->setRed(img2.getRed()); img->setType(img2.getType()); img->setWidth(img2.getWidth()); this->imgModificada=new Image(); updtaeImageModificada(img2); initComponents(image,title); createActions(); createMenus(); }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- RiuPlotMainWindow::RiuPlotMainWindow() : m_activePlotViewWindow(nullptr), m_windowMenu(nullptr), m_blockSlotSubWindowActivated(false) { m_mdiArea = new QMdiArea; m_mdiArea->setOption(QMdiArea::DontMaximizeSubWindowOnActivation, true); connect(m_mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), SLOT(slotSubWindowActivated(QMdiSubWindow*))); setCentralWidget(m_mdiArea); createMenus(); createToolBars(); createDockPanels(); // Store the layout so we can offer reset option m_initialDockAndToolbarLayout = saveState(0); m_dragDropInterface = std::unique_ptr<caf::PdmUiDragDropInterface>(new RiuDragDrop()); // Enabling the line below will activate the undo stack // When enableUndoCommandSystem is set false, all commands are executed and deleted immediately // caf::CmdExecCommandManager::instance()->enableUndoCommandSystem(true); }
ImageViewer::ImageViewer() { setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred); img = new picture_holder(this) ; img->setBackgroundRole(QPalette::Base); img->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); img->setScaledContents(true); scrollArea = new QScrollArea; scrollArea->setBackgroundRole(QPalette::Base); scrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); scrollArea->setWidget(img); setCentralWidget(scrollArea); // setCentralWidget(x); createActions(); createMenus(); resize(QGuiApplication::primaryScreen()->availableSize()); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); mdiArea = new QMdiArea; setCentralWidget(mdiArea); connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(updateActions())); createActions(); createMenus(); createToolBars(); createStatusBar(); setWindowIcon(QPixmap(":/images/icon.png")); setWindowTitle(tr("MDI Editor")); QTimer::singleShot(0, this, SLOT(loadFiles())); }
/*! \brief Constructor. Creates a new MainWindow instance. \param parent parent widget of this window, default value is \a 0 */ Ui::MainWindow::MainWindow(QWidget *parent /* = 0 */) : QMainWindow(parent) { setWindowIcon(QIcon(":/app")); setWindowTitle(tr("PicWorks v%1", "Main window title with version number.").arg(appCtx->version())); mapper = new QSignalMapper(this); mdiArea = new QMdiArea; setCentralWidget(mdiArea); createActions(); createMenus(); createStatusBar(); createDockPanels(); createToolBar(); createToolBox(); createCommonBar(); establishConnections(); }
MainWindow::MainWindow() { renderArea = new RenderArea(this); // tworzenie palety do rysowania setCentralWidget(renderArea); keyPressEater = new KeyPressEater(); createActions(); createMenus(); createDockWindows(); createStatusBar(); cmdLineEdit->setFocus(); connect(renderArea, SIGNAL(fail()), this, SLOT(fail())); setWindowTitle(tr("Turtle")); setWindowIcon(QIcon(":/images/hisc-app-kturtle.svg")); setCurrentFile(""); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); centralWidget = new QWidget(); QPalette pal(palette()); pal.setColor(QPalette::Background, Qt::white); centralWidget->setAutoFillBackground(true); centralWidget->setPalette(pal); QHBoxLayout * layout = new QHBoxLayout; createPanels(); layout->addWidget(drawPanel); layout->addWidget(controlPanel); centralWidget->setLayout(layout); this->setCentralWidget(centralWidget); createMenus(); resize(800, 600); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); settings = 0; // used for copy/paste textEdit = new QPlainTextEdit; generateTitle = new GenerateTitle(this); // create menus createActions(); createMenus(); connectSlots(); setInitialUiState(); }
MainWindow::MainWindow() { scene1 = new Scene1(); imageLabel = new QLabel; imageLabel->setBackgroundRole(QPalette::Base); imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); imageLabel->setScaledContents(true); scrollArea = new QScrollArea; scrollArea->setBackgroundRole(QPalette::Dark); scrollArea->setWidget(imageLabel); setCentralWidget(scrollArea); createActions(); createMenus(); setWindowTitle(tr("Ray Trace")); resize(800, 800); }
ImageWindow::ImageWindow() { imageLabel = new QLabel; imageLabel->setBackgroundRole(QPalette::Dark); imageLabel->setAutoFillBackground(true); imageLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop); setCentralWidget(imageLabel); createActions(); createMenus(); statusBar()->showMessage(tr("Ready"), 2000); connect(&thread, SIGNAL(transactionStarted(const QString &)), statusBar(), SLOT(showMessage(const QString &))); connect(&thread, SIGNAL(finished()), this, SLOT(allTransactionsDone())); setCurrentFile(""); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { createActions(); //创建主窗体的所有动作 createMenus(); //创建主窗体的菜单栏 scene = new QGraphicsScene; scene->setSceneRect(-200,-200,400,400); initScene(); //初始化场景 QGraphicsView *view = new QGraphicsView; view->setScene(scene); view->setMinimumSize(400,400); view->show(); setCentralWidget(view); resize(550,450); setWindowTitle(tr("Graphics Items")); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), pluginManager(PluginManager::instance()) { pluginManager->loadPlugins(); createActions(); createEditors(); createMenus(); createToolBars(); createStatusBar(); createDockWidget(); createConnections(); visualEditor->setFocus(); setCentralWidget(editorStack); setWindowTitle(tr("OrbitsWriter [*]")); setWindowIcon(QIcon(":/img/orbitswriter")); setUnifiedTitleAndToolBarOnMac(true); }
MainWindow::MainWindow() :mTimeTrackingAction(new TimeTrackingAction()), mMdiArea(NULL) { DEBUG_OBJ(""); setWindowIcon(QIcon(":/images/tt_icon.png")); DEBUG("Calling updateAllBalances"); IOFileAccesses::updateAllBalances(Misc::getUserName()); IOSettings settings; // First start do not allow access to perdiodic actions as the user needs to configure them if(!settings.readSettings(TimeTrackingSettings::getInstance())) { TimeTrackingSettings::getInstance()-> setEnablePeriodDefaultAction(false); } mMdiArea = new QMdiArea(); setCentralWidget(mMdiArea); ITimeTrackingWindow * curWindow = createSubWindow(); bool started = curWindow->isStarted(); bool stopped = curWindow->isStopped(); mTimeTrackingAction->setUserCurrentlyWorking(started && !stopped); connect(mMdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(updateActions())); mRecentFileActions = new vector<QAction*>(MaxRecentFiles); // All initialisations createActions(); createMenus(); createToolBars(); mDialogTimeFollower.reset(new DialogTimeFollower(NULL, curWindow->getTrackingModel())); mDialogTimeFollower->show(); connect(mDialogTimeFollower.get(), SIGNAL(start()), mStartAction, SLOT(trigger())); connect(mDialogTimeFollower.get(), SIGNAL(stop()), mStopAction, SLOT(trigger())); connect(mDialogTimeFollower.get(), SIGNAL(pause()), mPauseAction, SLOT(trigger())); }
Window::Window() { hide(); controller = new Controller(Settings::getUserName()); createActions(); createTrayIcon(); createMenus(); createStatusBar(); textLog = new QPlainTextEdit; textLog->appendPlainText(tr("Welcome") + ", " + Settings::getUserName() + "!"); textLog->appendPlainText(tr("If it is not you, choose Main->Profile to introduce yourself.")); textLog->appendPlainText(""); textLog->setReadOnly(true); setCentralWidget(textLog); appIcon = new QIcon(); appIcon->addFile(":/img/app.png", QSize(32, 32)); appIcon->addFile(":/img/tray.png", QSize(16, 16)); QRect screenRect = QApplication::desktop()->screenGeometry(QApplication::desktop()->primaryScreen()); QRect windowRect(0, 0, 400, 300); if (screenRect.width() < 400) { windowRect.setWidth(screenRect.width()); } if (screenRect.height() < 300) { windowRect.setHeight(screenRect.height()); } windowRect.moveCenter(screenRect.center()); setGeometry(windowRect); setFixedSize(400, 300); setWindowTitle(tr("QeyLogger Control Center")); setWindowIcon(*appIcon); show(); }
MainWindowImpl::MainWindowImpl( QWidget * parent, Qt::WFlags f) : QMainWindow(parent, f) { c_widget = new QWidget(); lab1_1_widget = new lab1_1(); connect(lab1_1_widget, SIGNAL(progress_val(int &)), this, SLOT(progress_val(int &))); connect(lab1_1_widget, SIGNAL(debug_info_sgn(QString &)), this, SLOT(debug_info_sgn(QString &))); lab1_1_widget->setDegugInfo(false); lab1_2_widget = new lab1_2(); connect(lab1_2_widget, SIGNAL(progress_val(int &)), this, SLOT(progress_val(int &))); connect(lab1_2_widget, SIGNAL(debug_info_sgn(QString &)), this, SLOT(debug_info_sgn(QString &))); lab1_2_widget->setDegugInfo(false); lab1_3_widget = new lab1_3(); connect(lab1_3_widget, SIGNAL(progress_val(int &)), this, SLOT(progress_val(int &))); connect(lab1_3_widget, SIGNAL(debug_info_sgn(QString &)), this, SLOT(debug_info_sgn(QString &))); lab1_3_widget->setDegugInfo(false); tabWidget = new QTabWidget(); tabWidget->addTab(lab1_1_widget, "Lab 1-1"); tabWidget->addTab(lab1_2_widget, "Lab 1-2"); tabWidget->addTab(lab1_3_widget, "Lab 1-3"); textBrowser = new QTextBrowser(); textBrowser->setMaximumHeight(80); QVBoxLayout *mainLayout = new QVBoxLayout(c_widget); mainLayout->addWidget(tabWidget); mainLayout->addWidget(textBrowser); setCentralWidget(c_widget); createActions(); createMenus(); createToolBars(); createStatusBar(); setWindowIcon(QIcon(":/images/icon.png")); }
GameScreen::GameScreen(QWidget *parent) : QMainWindow(parent), ui(new Ui::GameScreen) { ui->setupUi(this); tmp = new QMainWindow(this); paddleIcon = new QPixmap("C:/Users/TAYLOR/Documents/C++ Files/BrickBreak/paddle.png"); ballIcon = new QPixmap("C:/Users/TAYLOR/Documents/C++ Files/BrickBreak/white_ball.png"); gameOverIcon = new QPixmap("C:/Users/TAYLOR/Documents/C++ Files/BrickBreak/gameover.png"); gameOverlay = new QPixmap("C:/Users/TAYLOR/Documents/C++ Files/BrickBreak/background.jpg"); gameWonIcon = new QPixmap("C:/Users/TAYLOR/Documents/C++ Files/BrickBreak/youwin.jpg"); overlayLbl = new QLabel(this); overlayLbl->setPixmap(*gameOverlay); overlayLbl->setGeometry(0, ui->menuBar->height(), this->width() - (this->width() - ui->rightLine->pos().x()), this->height() - (this->height() - ui->bottomLine->pos().y())); connect(this, SIGNAL(eventTriggered(QString)), this, SLOT(writeEvent(QString))); connect(this, SIGNAL(gameEnded()), this, SLOT(gameOver())); diff = EASY; level = 1; newLevel(level); createActions(); createMenus(); createPaddle(); createBall(); numLives = 3; time = new Timer(this, "time"); connect(time, SIGNAL(timeout()), this, SLOT(decrementTimer())); cheatModeActive = false; spacePressed = false; score = 0; createBlocks(); eventLogFullSizePos = new QPoint(310, 10); eventLogHalfSizePos = new QPoint(310, 200); hideCheatMode(); setLivesText(numLives); setTimeText(timeLeft); setLevelText(level); setScoreText(score); }
//! [0] ImageViewer::ImageViewer() { imageLabel = new QLabel; imageLabel->setBackgroundRole(QPalette::Base); imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); imageLabel->setScaledContents(true); scrollArea = new QScrollArea; scrollArea->setBackgroundRole(QPalette::Dark); scrollArea->setWidget(imageLabel); setCentralWidget(scrollArea); createActions(); createMenus(); setWindowTitle(tr("")); resize(800, 600); setWindowIcon(QIcon(":/images/icon.png")); }
MainWindow::MainWindow() { window = new QWidget; setCentralWidget( window ); setWindowTitle( "Sudoku" ); setWindowIcon( QIcon( ":/icon.gif" ) ); QGridLayout * layout = new QGridLayout; puzzleBoard = new PuzzleBoard(); for( unsigned int i = 0; i < 9; i++ ) { for( unsigned int j = 0; j < 9; j++ ) { layout->addWidget(puzzleBoard->puzzleBox(i,j),i,j,1,1); } } window->setLayout( layout ); createActions(); createMenus(); }
worms::worms() { createActions(); createMenus(); createToolBars(); createStatusBar(); settings = new QSettings("kreved.org", "worms"); scene = new QGraphicsScene; scene->addEllipse(QRectF(-100.0, -100.0, 100.0, 100.0)); scene->setBackgroundBrush(Qt::blue); this-> // a gradient background QRadialGradient gradient(0, 0, 10); gradient.setSpread(QGradient::RepeatSpread); scene->setBackgroundBrush(gradient); QGraphicsView view(scene); view.show(); readSettings(); }
/*! * \brief Module::Module * \param parent * \param name * * \todo move the generation of the ports and the main shape out of the constructor */ Module::Module(QGraphicsItem *parent, QString name) : Base(parent) , m_id(vistle::message::Id::Invalid) , m_Status(SPAWNING) , m_validPosition(false) , m_fontHeight(0.) { setName(name); setFlag(QGraphicsItem::ItemIsMovable); setFlag(QGraphicsItem::ItemIsSelectable); setFlag(QGraphicsItem::ItemIsFocusable); setFlag(QGraphicsItem::ItemSendsGeometryChanges); setCursor(Qt::OpenHandCursor); createActions(); createMenus(); createGeometry(); setStatus(m_Status); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent){ setupUi(this); setWindowTitle(tr("Very tiny web browser")); readBMFile(); createActions(); createMenus(); view = new QWebView(this); setCentralWidget(view); showMaximized(); readSettings(); view->setUrl(QUrl(m_homePage)); view->show(); }