void MyVis::toggleFullScreen() { static bool showMainWindow = false; static bool showMiniQMPlay = false; if ( isFullScreen() ) { if ( !QLib->getParent( QMP_MAIN )->isVisible() && showMainWindow ) QLib->control( 0xE, 0 ); showMainWindow = false; if ( QLib->getParent( QMP_MINI )->isVisible() ) QLib->control( 0xD, 0 ); //chowanie miniqmp if ( showMiniQMPlay ) { QLib->control( 0xD, 0 ); //pokazywanie miniqmp showMiniQMPlay = false; } if ( QLib->inDock() == NULL && wasInDock ) QLib->dock(this,true,unDock); else { showNormal(); hide(); show(); } } else { if ( QLib->inDock() == this ) { QLib->dock(NULL,false,NULL); wasInDock = true; } else wasInDock = false; if ( QLib->getParent( QMP_MAIN )->isVisible() ) { QLib->control( 0xE, 0 ); //chowanie okna głównego showMainWindow = true; } if ( QLib->getParent( QMP_MINI )->isVisible() ) { QLib->control( 0xD, 0 ); //chowanie miniqmp showMiniQMPlay = true; } showFullScreen(); cursorTim.start( 1500 ); } }
void OpenGLWidget::keyPressEvent(QKeyEvent* event) { if (event->key() < 1024) keys[event->key()] = true; if (event->key() == Qt::Key::Key_Q) { zoom *= 2.0f; fractal.computeVariables.at(fractal.computeVariables.size() - 1)->setValue(); rendermodeLR = ALL; } else if (event->key() == Qt::Key::Key_E) { zoom /= 2.0f; fractal.computeVariables.at(fractal.computeVariables.size() - 1)->setValue(); rendermodeLR = ALL; } else if (event->key() == Qt::Key::Key_P) { QString file = QFileDialog::getSaveFileName(this, "Save as...", "screenshot", "PNG (*.png);; BMP (*.bmp);;TIFF (*.tiff *.tif);; JPEG (*.jpg *.jpeg)"); this->grabFramebuffer().save(file); } else if (event->key() == Qt::Key::Key_F11) { if (this->windowState() == Qt::WindowState::WindowFullScreen) showNormal(); else showFullScreen(); } else if (event->key() == Qt::Key::Key_0) go = !go; else if (event->key() == Qt::Key::Key_9) { go = false; anim.reset(); } else if (event->key() == Qt::Key::Key_I) autoIterations = !autoIterations; else if (event->key() == Qt::Key::Key_F8) { if (consoleHidden) ShowWindow(GetConsoleWindow(), SW_SHOW); else ShowWindow(GetConsoleWindow(), SW_HIDE); consoleHidden = !consoleHidden; } }
void MusicLrcContainerForDesktop::creatToolBarWidget() { m_toolBarWidget = new QWidget(this); m_toolBarWidget->setStyleSheet(MusicUIObject::MCustomStyle09); m_toolBarWidget->setGeometry((m_geometry.x() - TOOLBAR_WIDTH)/2, 0, TOOLBAR_WIDTH, TOOLBAR_HEIGHT); m_showMainWindow = new QPushButton(m_toolBarWidget); m_toolCloseButton = new QToolButton(m_toolBarWidget); m_toolCloseButton->setGeometry(290, 0, 30, TOOLBAR_HEIGHT); connect(m_toolCloseButton, SIGNAL(clicked()), SLOT(close())); m_toolWindowLockedButton = new QToolButton(m_toolBarWidget); m_toolWindowLockedButton->setGeometry(260, 0, 30, TOOLBAR_HEIGHT); connect(m_toolWindowLockedButton, SIGNAL(clicked()), SLOT(setWindowLockedChanged())); m_toolLrcBigerButton = new QToolButton(m_toolBarWidget); m_toolLrcBigerButton->setGeometry(200, 0, 30, TOOLBAR_HEIGHT); connect(m_toolLrcBigerButton, SIGNAL(clicked()), SLOT(setLrcBigerChanged())); m_toolLrcSmallerButton = new QToolButton(m_toolBarWidget); m_toolLrcSmallerButton->setGeometry(230, 0, 30, TOOLBAR_HEIGHT); connect(m_toolLrcSmallerButton, SIGNAL(clicked()), SLOT(setLrcSmallerChanged())); m_toolUpdateLrcButton = new QToolButton(m_toolBarWidget); m_toolUpdateLrcButton->setGeometry(170, 0, 30, TOOLBAR_HEIGHT); connect(m_toolUpdateLrcButton, SIGNAL(clicked()), SIGNAL(theCurrentLrcUpdated())); m_toolSettingButton = new QToolButton(m_toolBarWidget); m_toolSettingButton->setGeometry(140, 0, 30, TOOLBAR_HEIGHT); connect(m_toolSettingButton, SIGNAL(clicked()), SLOT(currentLrcCustom())); m_toolPreSongButton = new QToolButton(m_toolBarWidget); m_toolPreSongButton->setGeometry(50, 0, 30, TOOLBAR_HEIGHT); m_toolNextSongButton = new QToolButton(m_toolBarWidget); m_toolNextSongButton->setGeometry(110, 0, 30, TOOLBAR_HEIGHT); m_toolPlayButton = new QToolButton(m_toolBarWidget); m_toolPlayButton->setGeometry(80, 0, 30, TOOLBAR_HEIGHT); connect(m_toolPreSongButton, SIGNAL(clicked()), m_supperClass, SLOT(musicPlayPrivious())); connect(m_toolNextSongButton, SIGNAL(clicked()), m_supperClass, SLOT(musicPlayNext())); connect(m_toolPlayButton, SIGNAL(clicked()), m_supperClass, SLOT(musicKey())); connect(m_showMainWindow, SIGNAL(clicked()), m_supperClass, SLOT(showNormal())); setButtonIcon(); setButtonCursor(); setButtonTips(); m_toolBarWidget->hide(); }
void CShareBox::Init() { /* Set the window's size and opacity. */ resize(DefaultWidth, DefaultHeight); setWindowOpacity(DefaultOpacity); /* Set the colors and fonts. */ m_text_font.setPixelSize(28); m_text_normal.setRgb(215, 215, 215); m_text_highlight.setRgb(127, 127, 255); m_border_highlight.setRgb(127, 127, 215); /* Create the context menu and show the box. */ CreateContextMenu(); showNormal(); }
void nehewidget::keyPressEvent(QKeyEvent *e) { switch(e->key()) { case Qt::Key_F2: fullscreen=!fullscreen; if(fullscreen) showFullScreen(); else { showNormal(); setGeometry(0,0,640,480); } updateGL(); break; case Qt::Key_Escape: close(); } }
void MainWindow::setFullScreenMode(std::size_t screenNo, std::size_t resIndex, std::size_t rateIndex) { if (screenNo < w_->screens() && (w_->currentResIndex(screenNo) != resIndex || w_->currentRateIndex(screenNo) != rateIndex)) { if (w_->isFullMode() && screenNo == w_->currentScreen()) { w_->parentExclusiveEvent(false); w_->setMode(screenNo, resIndex, rateIndex); #ifdef Q_WS_WIN showNormal(); showFullScreen(); #endif correctFullScreenGeometry(); w_->parentExclusiveEvent(isFullScreen() & hasFocus()); } else w_->setMode(screenNo, resIndex, rateIndex); } }
void MainWindow::trayIconActivated(QSystemTrayIcon::ActivationReason reason) { switch(reason){ case QSystemTrayIcon::Trigger: case QSystemTrayIcon::DoubleClick: if (isHidden() || isMinimized()) { showNormal(); activateWindow(); } else showMinimized(); break; default: ; } }
void Buddies::createActions() { minimizeAction = new QAction(tr("Mi&nimize"), this); connect(minimizeAction, SIGNAL(triggered()), this, SLOT(hide())); maximizeAction = new QAction(tr("Ma&ximize"), this); connect(maximizeAction, SIGNAL(triggered()), this, SLOT(showMaximized())); restoreAction = new QAction(tr("&Restore"), this); connect(restoreAction, SIGNAL(triggered()), this, SLOT(showNormal())); quitAction = new QAction(tr("&Quit"), this); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); qDebug("=> Tray actions"); }
/*---------------------------------------------------------------------------*/ void MainWindow::ToggleFullScreen( void ) { static bool fullScreen = true; if ( fullScreen ) { menuBar( )->hide( ); showFullScreen( ); } else { menuBar( )->show( ); showNormal( ); } fullScreen = !fullScreen; }
void MainWindow::setMainWindowVisibility(bool state) { if(state){ showNormal(); setWindowState(Qt::WindowNoState); qApp->processEvents(); setWindowState(Qt::WindowActive); qApp->processEvents(); qApp->setActiveWindow(this); qApp->processEvents(); m_restoreAction->setText(tr("Hide WifiAssist")); }else{ m_restoreAction->setText(tr("Show WifiAssist")); hide(); } }
void MainWindow::show() { if (!isVisible() && !_trayed) showNormal(); if (_conf->getShowTrayIcon()) { _trayIcon->blockSignals(false); _trayIcon->setContextMenu(_trayMenu); // enable context menu } if (_trayIcon) _trayIcon->setVisible(true); QMainWindow::show(); }
void MainWindow::iconActivated(QSystemTrayIcon::ActivationReason reason) { switch (reason) { case QSystemTrayIcon::Trigger: case QSystemTrayIcon::DoubleClick: if (isVisible()) hide(); else showNormal(); break; case QSystemTrayIcon::MiddleClick: break; default: ; } }
void MainWindow::on_action_OptionsFullScreen_triggered() { if(isFullScreen()) { g_Config.bFullScreen = false; showNormal(); ui->menubar->setVisible(true); ui->statusbar->setVisible(true); SetZoom(g_Config.iInternalResolution); InitPadLayout(); if (globalUIState == UISTATE_INGAME && QApplication::overrideCursor()) QApplication::restoreOverrideCursor(); } else { g_Config.bFullScreen = true; ui->menubar->setVisible(false); ui->statusbar->setVisible(false); // Remove constraint emugl->setMinimumSize(0, 0); emugl->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); ui->centralwidget->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); showFullScreen(); int width = (int) QApplication::desktop()->screenGeometry().width(); int height = (int) QApplication::desktop()->screenGeometry().height(); PSP_CoreParameter().pixelWidth = width; PSP_CoreParameter().pixelHeight = height; PSP_CoreParameter().outputWidth = width; PSP_CoreParameter().outputHeight = height; PSP_CoreParameter().renderWidth = width; PSP_CoreParameter().renderHeight = height; pixel_xres = width; pixel_yres = height; dp_xres = pixel_xres; dp_yres = pixel_yres; if (gpu) gpu->Resized(); InitPadLayout(); if (globalUIState == UISTATE_INGAME && !g_Config.bShowTouchControls) QApplication::setOverrideCursor(QCursor(Qt::BlankCursor)); } }
bool FixtureConsole::loadXML(QDomDocument* doc, QDomElement* root) { bool visible = false; int x = 0; int y = 0; int w = 0; int h = 0; QDomNode node; QDomElement tag; Q_ASSERT(doc != NULL); Q_ASSERT(root != NULL); if (root->tagName() != KXMLQLCFixtureConsole) { qWarning("Fixture console node not found!"); return false; } node = root->firstChild(); while (node.isNull() == false) { tag = node.toElement(); if (tag.tagName() == KXMLQLCWindowState) { FileHandler::loadXMLWindowState(&tag, &x, &y, &w, &h, &visible); } else { qDebug("Unknown fixture console tag: %s", (const char*) tag.tagName()); } node = node.nextSibling(); } hide(); setGeometry(x, y, w, h); if (visible == false) showMinimized(); else showNormal(); return true; }
void UIYabause::fullscreenRequested( bool f ) { if ( isFullScreen() && !f ) { #ifdef USE_UNIFIED_TITLE_TOOLBAR setUnifiedTitleAndToolBarOnMac( true ); #endif toggleFullscreen(0, 0, false, -1 ); showNormal(); VolatileSettings* vs = QtYabause::volatileSettings(); int menubarHide = vs->value( "View/Menubar" ).toInt(); if ( menubarHide == BD_HIDEFS || menubarHide == BD_SHOWONFSHOVER) menubar->show(); if ( vs->value( "View/Toolbar" ).toInt() == BD_HIDEFS ) toolBar->show(); setCursor(Qt::ArrowCursor); hideMouseTimer->stop(); } else if ( !isFullScreen() && f ) { #ifdef USE_UNIFIED_TITLE_TOOLBAR setUnifiedTitleAndToolBarOnMac( false ); #endif VolatileSettings* vs = QtYabause::volatileSettings(); setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); setMinimumSize( 0,0 ); toggleFullscreen(vs->value("Video/FullscreenWidth").toInt(), vs->value("Video/FullscreenHeight").toInt(), f, vs->value("Video/VideoFormat").toInt()); showFullScreen(); if ( vs->value( "View/Menubar" ).toInt() == BD_HIDEFS ) menubar->hide(); if ( vs->value( "View/Toolbar" ).toInt() == BD_HIDEFS ) toolBar->hide(); hideMouseTimer->start(3 * 1000); } if ( aViewFullscreen->isChecked() != f ) aViewFullscreen->setChecked( f ); aViewFullscreen->setIcon( QIcon( f ? ":/actions/no_fullscreen.png" : ":/actions/fullscreen.png" ) ); }
void MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason) { qDebug() << "Tray activated"; if (reason == QSystemTrayIcon::DoubleClick) { if (isVisible()) { qDebug() << "Closing"; close(); } else { showNormal(); } } }
void MainWindow::windowHideShow() { if (isHidden()) { actHideShow->setText(tr("Hide")); _trayed = false; showNormal(); activateWindow(); } else { actHideShow->setText(tr("Show")); showMinimized(); hide(); _trayed = true; } }
void NGLScene::keyPressEvent(QKeyEvent *_event) { // this method is called every time the main window recives a key event. // we then switch on the key value and set the camera in the NGLScene switch (_event->key()) { // escape key to quite case Qt::Key_Escape : QGuiApplication::exit(EXIT_SUCCESS); break; // turn on wirframe rendering case Qt::Key_W : glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); break; // turn off wire frame case Qt::Key_S : glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); break; // show full screen case Qt::Key_F : showFullScreen(); break; // show windowed case Qt::Key_N : showNormal(); break; case Qt::Key_Space : toggleAnimation(); break; case Qt::Key_X : stepAnimation(); break; case Qt::Key_Left : m_rot+=5; break; case Qt::Key_Right : m_rot-=5; break; case Qt::Key_Down : m_y-=1.0; break; case Qt::Key_Up : m_y+=1.0; break; case Qt::Key_Plus : case Qt::Key_Equal : m_numBlocks+=5; if(m_numBlocks > 300) m_numBlocks=300; resetSim(); break; case Qt::Key_Minus : m_numBlocks-=5; if(m_numBlocks<10) m_numBlocks=10; resetSim(); break; case Qt::Key_0 : resetSim();break; default : break; } // finally update the GLWindow and re-draw //if (isExposed()) m_firePos.set(cos(ngl::radians((m_rot)))*m_radius, m_y, sin(ngl::radians(m_rot))*m_radius); update(); }
void startDialog::start() { w = new MainWindow(app, QHostAddress(ui->lineEdit_2->text()), ui->spinBox->value(), ui->lineEdit->text().toLocal8Bit(), skinPath + ui->comboBox->currentText(), mouseSensitivity, this); connectWindow = new Connection(tr("Connecting to: ") + ui->lineEdit_2->text() + ":" + ui->spinBox->text()); this->hide(); connectWindow->show(); QObject::connect(w, SIGNAL(fail()), this, SLOT(show())); QObject::connect(w, SIGNAL(successConnection()), connectWindow, SLOT(hide())); QObject::connect(w, SIGNAL(fail()), connectWindow, SLOT(hide())); QObject::connect(w, SIGNAL(fail()), w, SLOT(deleteLater())); QObject::connect(w, SIGNAL(successConnection()), w->widget, SLOT(show())); if (ui->fullScreen->checkState() == Qt::Checked) QObject::connect(w, SIGNAL(successConnection()), w->widget, SLOT(showFullScreen())); else QObject::connect(w, SIGNAL(successConnection()), w->widget, SLOT(showNormal())); }
void DlgJsRoboKey::createActions() { actEditMainScript = new QAction("Edit main script", this); connect(actEditMainScript, SIGNAL(triggered()), this, SLOT(createAndEditMainScriptFile())); minimizeAction = new QAction(tr("Mi&nimize"), this); connect(minimizeAction, SIGNAL(triggered()), this, SLOT(hide())); maximizeAction = new QAction(tr("Ma&ximize"), this); connect(maximizeAction, SIGNAL(triggered()), this, SLOT(showMaximized())); restoreAction = new QAction(tr("&Restore"), this); connect(restoreAction, SIGNAL(triggered()), this, SLOT(showNormal())); quitAction = new QAction(tr("&Quit"), this); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); }
void QApplicationWindow::setFullscreen(bool fullscreen) { if (fullscreen == myFullScreen) { return; } myFullScreen = fullscreen; if (myFullScreen) { myWasMaximized = isMaximized(); menuBar()->hide(); showFullScreen(); } else { menuBar()->show(); showNormal(); if (myWasMaximized) { showMaximized(); } } }
void TopWindow::handleEvents() { connect(ui->minButton, &QPushButton::clicked, [this] { showMinimized(); // 最小化 }); connect(ui->maxButton, &QPushButton::clicked, [this] { showMaximized(); // 最大化 }); connect(ui->restoreButton, &QPushButton::clicked, [this] { showNormal(); // 恢复窗口大小 }); connect(ui->closeButton, &QPushButton::clicked, [this] { close(); // 关闭窗口 }); }
void Window::createActions() { hideAction = new QAction(tr("&Hide"), this); connect(hideAction, SIGNAL(triggered()), this, SLOT(hide())); showAction = new QAction(tr("&Show Log"), this); connect(showAction, SIGNAL(triggered()), this, SLOT(showNormal())); quitAction = new QAction(tr("&Quit"), this); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); aboutAction = new QAction(tr("&About"), this); connect(aboutAction, SIGNAL(triggered()), this, SLOT(about())); prefsAction = new QAction(tr("&Preferences"), this); connect(prefsAction, SIGNAL(triggered()), this, SLOT(showPreferences())); }
void Virtual3dCharacterViewer::keyPressEvent( QKeyEvent *e ) { #define PI 3.1415926 switch ( e->key() ) { case Qt::Key_F2: if ( ! fullscreen ) { fullscreen = true ; showFullScreen(); update(); } break; case Qt::Key_Escape: if ( fullscreen ) { fullscreen = false ; showNormal(); update(); } break; case Qt::Key_L: light = !light; if ( !light ) { glDisable( GL_LIGHTING ); } else { glEnable( GL_LIGHTING ); } break; case Qt::Key_Up: WorldInCamera.Pos.setZ ( WorldInCamera.Pos.getZ() - 0.1 ) ; break ; case Qt::Key_Down: WorldInCamera.Pos.setZ ( WorldInCamera.Pos.getZ() + 0.1 ) ; break ; default: break ; } }
void NGLScene::keyPressEvent(QKeyEvent *_event) { // this method is called every time the main window recives a key event. // we then switch on the key value and set the camera in the NGLScene switch (_event->key()) { // escape key to quite case Qt::Key_Escape : QGuiApplication::exit(EXIT_SUCCESS); break; // turn on wirframe rendering case Qt::Key_W : glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); break; // turn off wire frame case Qt::Key_S : glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); break; // show full screen case Qt::Key_F : showFullScreen(); break; // show windowed case Qt::Key_N : showNormal(); break; case Qt::Key_Space : m_car->reset(); break; case Qt::Key_X : stepAnimation(); break; case Qt::Key_1 : addCube(); break; case Qt::Key_2 : addSphere(); break; case Qt::Key_3 : addCapsule(); break; case Qt::Key_4 : addCylinder(); break; case Qt::Key_5 : addCone(); break; case Qt::Key_6 : addMesh(TEAPOT); break; case Qt::Key_7 : addMesh(APPLE); break; /* case Qt::Key_Left : m_physics->addImpulse(ngl::Vec3(-5,0.0f,0.0f)); break; case Qt::Key_Right : m_physics->addImpulse(ngl::Vec3(5.0f,0.0f,0.0f)); break; case Qt::Key_Up : m_physics->addImpulse(ngl::Vec3(0.0f,5.0f,0.0f)); break; case Qt::Key_Down : m_physics->addImpulse(ngl::Vec3(0.0f,-5.0f,0.0f)); break; */ case Qt::Key_Left : m_car->left(); break; case Qt::Key_Right : m_car->right(); break; case Qt::Key_Up : m_car->accelerate(); break; case Qt::Key_Down : m_car->stop(); break; case Qt::Key_B : toggleBBox(); break; case Qt::Key_R : toggleRandomPlace(); break; case Qt::Key_0 : resetSim(); break; default : break; } // finally update the GLWindow and re-draw //if (isExposed()) renderNow(); }
void MusicTopAreaWidget::createRemoteWidget() { if(m_musicRemoteWidget == nullptr) { return; } m_musicRemoteWidget->showPlayStatus(m_currentPlayStatus); m_musicRemoteWidget->setVolumeValue(m_ui->musicSoundSlider->value()); connect(m_musicRemoteWidget, SIGNAL(musicWindowSignal()), m_supperClass, SLOT(showNormal())); connect(m_musicRemoteWidget, SIGNAL(musicPlayPriviousSignal()), m_supperClass, SLOT(musicPlayPrivious())); connect(m_musicRemoteWidget, SIGNAL(musicPlayNextSignal()), m_supperClass, SLOT(musicPlayNext())); connect(m_musicRemoteWidget, SIGNAL(musicKeySignal()), m_supperClass, SLOT(musicKey())); connect(m_musicRemoteWidget, SIGNAL(musicSettingSignal()), m_supperClass, SLOT(musicSetting())); connect(m_musicRemoteWidget, SIGNAL(musicVolumeSignal(int)), SLOT(musicVolumeChangedFromRemote(int))); connect(m_musicRemoteWidget, SIGNAL(musicRemoteTypeChanged(QAction*)), SLOT(musicRemoteTypeChanged(QAction*))); m_musicRemoteWidget->show(); }
/** * @brief Dialog::iconIsActived * @param reason * 托盘图标活动 */ void Dialog::iconIsActived(QSystemTrayIcon::ActivationReason reason) { switch(reason) { case QSystemTrayIcon::DoubleClick: showNormal(); break; case QSystemTrayIcon::Trigger: showMessageBox(); break; case QSystemTrayIcon::Unknown: QMessageBox::about(this, "unkown", "unkown activation"); break; default: break; } }
void MainWindow::showEvent(QShowEvent *event) { // Check if hideEvent has been processed if (signalDisconnect) { // Restore flashing buttons enableFlashActions(); signalDisconnect = false; // Only needed if hidden with the system tray enabled if (QSystemTrayIcon::isSystemTrayAvailable() && showTrayIcon) { showNormal(); } } QMainWindow::showEvent(event); }
ImageWindow::ImageWindow(const std::string &pictureFileName, QWidget *parent): QLabel(parent), bError(false), sImageFileName(pictureFileName), bSvg(true), renderer(0) { setAlignment(Qt::AlignCenter); setWindowFlags(windowFlags()|Qt::Window); // setting background color to black QPalette newPalette(palette()); newPalette.setColor(QPalette::Window,QColor("black")); setPalette(newPalette); // displaying (or not) the picture if (sImageFileName.length() < 3 || !QFileInfo(sImageFileName.c_str()).exists()) { bError = true; return; } if (sImageFileName.substr(sImageFileName.length()-3,3) != "svg") { bSvg = false; pix = QPixmap(sImageFileName.c_str()); if (pix.isNull()) { // the image cannot be loaded bError = true; return; } else { setPixmap(pix); } } if (bSvg) { renderer = new QSvgRenderer(this); if (!renderer->load(QString(sImageFileName.c_str()))) { // unable to load the image bError = true; return; } resize(renderer->defaultSize()); // the size is fixed when the image does not exist QRectF rect = renderer->viewBoxF(); dAspectRatio = rect.width()/rect.height(); } showNormal(); }
void Player::setFullScreen() { if (is_fullscreen) { showNormal(); is_fullscreen = false; //show hidden widgets if (Settings::useSkin) { ui->titleBar->show(); //show borders leftBorder->show(); rightBorder->show(); bottomBorder->show(); } else menubar->show(); ui->toolBar->show(); playlist->show(); ui->hideButton->setEnabled(true); ui->netButton->setEnabled(true); } else { showFullScreen(); is_fullscreen = true; //hide other widgets if (Settings::useSkin) ui->titleBar->hide(); else menubar->hide(); ui->toolBar->hide(); playlist->hide(); ui->hideButton->setEnabled(false); ui->netButton->setEnabled(false); //hide borders leftBorder->hide(); rightBorder->hide(); bottomBorder->hide(); //set auto-hide toolbar toolbar_visible = false; toolbar_pos_y = QApplication::desktop()->height() - ui->toolBar->height() / 2; } }