这篇教程C++ windowHandle函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中windowHandle函数的典型用法代码示例。如果您正苦于以下问题:C++ windowHandle函数的具体用法?C++ windowHandle怎么用?C++ windowHandle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了windowHandle函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: configvoid SmugWindow::writeSettings(){ KConfig config(QString::fromLatin1("kipirc")); KConfigGroup grp = config.group("Smug Settings"); grp.writeEntry("AnonymousImport", m_anonymousImport); grp.writeEntry("Email", m_email); grp.writeEntry("Password", m_password); grp.writeEntry("Current Album", m_currentAlbumID); grp.writeEntry("Current Key", m_currentAlbumKey); grp.writeEntry("Resize", m_widget->m_resizeChB->isChecked()); grp.writeEntry("Maximum Width", m_widget->m_dimensionSpB->value()); grp.writeEntry("Image Quality", m_widget->m_imageQualitySpB->value()); if (m_import) { KConfigGroup dialogGroup = config.group("Smug Import Dialog"); KWindowConfig::saveWindowSize(windowHandle(), dialogGroup); } else { KConfigGroup dialogGroup = config.group("Smug Export Dialog"); KWindowConfig::saveWindowSize(windowHandle(), dialogGroup); } config.sync();}
开发者ID:Vogtinator,项目名称:kipi-plugins,代码行数:26,
示例2: QWidgetOBSQTDisplay::OBSQTDisplay(QWidget *parent, Qt::WindowFlags flags) : QWidget(parent, flags){ setAttribute(Qt::WA_PaintOnScreen); setAttribute(Qt::WA_StaticContents); setAttribute(Qt::WA_NoSystemBackground); setAttribute(Qt::WA_OpaquePaintEvent); setAttribute(Qt::WA_DontCreateNativeAncestors); setAttribute(Qt::WA_NativeWindow); auto windowVisible = [this] (bool visible) { if (!visible) return; if (!display) { CreateDisplay(); } else { QSize size = GetPixelSize(this); obs_display_resize(display, size.width(), size.height()); } }; auto sizeChanged = [this] (QScreen*) { CreateDisplay(); QSize size = GetPixelSize(this); obs_display_resize(display, size.width(), size.height()); }; connect(windowHandle(), &QWindow::visibleChanged, windowVisible); connect(windowHandle(), &QWindow::screenChanged, sizeChanged);}
开发者ID:dourgulf,项目名称:biliobs,代码行数:34,
示例3: Q_Dvoid QWidget::setWindowState(Qt::WindowStates newstate){ Q_D(QWidget); Qt::WindowStates oldstate = windowState(); if (oldstate == newstate) return; if (isWindow() && !testAttribute(Qt::WA_WState_Created)) create(); data->window_state = newstate; data->in_set_window_state = 1; Qt::WindowState newEffectiveState = effectiveState(newstate); Qt::WindowState oldEffectiveState = effectiveState(oldstate); if (isWindow() && newEffectiveState != oldEffectiveState) { // Ensure the initial size is valid, since we store it as normalGeometry below. if (!testAttribute(Qt::WA_Resized) && !isVisible()) adjustSize(); d->createTLExtra(); if (oldEffectiveState == Qt::WindowNoState) d->topData()->normalGeometry = geometry(); Q_ASSERT(windowHandle()); windowHandle()->setWindowState(newEffectiveState); } data->in_set_window_state = 0; if (newstate & Qt::WindowActive) activateWindow(); QWindowStateChangeEvent e(oldstate); QApplication::sendEvent(this, &e);}
开发者ID:cedrus,项目名称:qt,代码行数:33,
示例4: switchbool WindowWidget::event(QEvent *evt) { bool ret = QWidget::event(evt); if (m_hostedWindow) {// if (evt->type() == QEvent::UpdateRequest)// return true; switch (evt->type()) { case QEvent::Wheel: case QEvent::KeyPress: case QEvent::KeyRelease: qGuiApp->sendEvent(m_hostedWindow, evt); break; case QEvent::Show: if (!m_hostedWindow->parent()) m_hostedWindow->setParent(windowHandle()); break; case QEvent::Resize: m_hostedWindow->resize(this->size()); break; case QEvent::Move: break; case QEvent::Hide: windowHandle()->close(); break; default: qGuiApp->sendEvent(m_hostedWindow, evt); } } return ret;}
开发者ID:makroid,项目名称:FractalSphere,代码行数:29,
示例5: QMainWindowMainWindow::MainWindow() : QMainWindow() , m_server_process(new QProcess(this)) , m_orientation_index(0) , m_grid_row(0) , m_grid(new QGridLayout) , m_start_server(new QPushButton) , m_rotate_keyboard(new QPushButton("Rotate input method")){ m_server_process->setProcessChannelMode(QProcess::ForwardedChannels); connect(m_server_process, SIGNAL(stateChanged(QProcess::ProcessState)), this, SLOT(onServerStateChanged())); connect(m_start_server, SIGNAL(clicked()), this, SLOT(onStartServerClicked())); connect(m_rotate_keyboard, SIGNAL(clicked()), this, SLOT(onRotateKeyboardClicked())); initUI(); onServerStateChanged(); qWarning()<<"Screen Orientation:"<<windowHandle()->screen()->primaryOrientation()<<windowHandle()->screen()->geometry(); // Work around a bug in maliit input method support where primary orientation is always portrait windowHandle()->reportContentOrientationChange(windowHandle()->screen()->primaryOrientation());}
开发者ID:KDE,项目名称:plasma-maliit-framework,代码行数:26,
示例6: slotItemToggledvoid MaintenanceDlg::readSettings(){ KSharedConfig::Ptr config = KSharedConfig::openConfig(); KConfigGroup group = config->group(d->configGroupName); d->expanderBox->readSettings(group); d->albumSelectors->loadState(); MaintenanceSettings prm; d->useMutiCoreCPU->setChecked(group.readEntry(d->configUseMutiCoreCPU, prm.useMutiCoreCPU)); d->expanderBox->setChecked(Private::NewItems, group.readEntry(d->configNewItems, prm.newItems)); d->expanderBox->setChecked(Private::Thumbnails, group.readEntry(d->configThumbnails, prm.thumbnails)); d->scanThumbs->setChecked(group.readEntry(d->configScanThumbs, prm.scanThumbs)); d->expanderBox->setChecked(Private::FingerPrints, group.readEntry(d->configFingerPrints, prm.fingerPrints)); d->scanFingerPrints->setChecked(group.readEntry(d->configScanFingerPrints, prm.scanFingerPrints)); d->expanderBox->setChecked(Private::Duplicates, group.readEntry(d->configDuplicates, prm.duplicates)); d->similarity->setValue(group.readEntry(d->configSimilarity, prm.similarity)); d->expanderBox->setChecked(Private::FaceManagement, group.readEntry(d->configFaceManagement, prm.faceManagement)); d->faceScannedHandling->setCurrentIndex(group.readEntry(d->configFaceScannedHandling, (int)prm.faceSettings.alreadyScannedHandling)); d->expanderBox->setChecked(Private::ImageQualitySorter, group.readEntry(d->configImageQualitySorter, prm.qualitySort)); d->qualityScanMode->setCurrentIndex(group.readEntry(d->configQualityScanMode, prm.qualityScanMode)); d->expanderBox->setChecked(Private::MetadataSync, group.readEntry(d->configMetadataSync, prm.metadataSync)); d->syncDirection->setCurrentIndex(group.readEntry(d->configSyncDirection, prm.syncDirection)); for (int i = Private::NewItems ; i < Private::Stretch ; ++i) { slotItemToggled(i, d->expanderBox->isChecked(i)); } winId(); DXmlGuiWindow::restoreWindowSize(windowHandle(), group); resize(windowHandle()->size());}
开发者ID:templeblock,项目名称:digikam,代码行数:33,
示例7: QT_VERSION_CHECKqreal GRenderWindow::windowPixelRatio() {#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) // windowHandle() might not be accessible until the window is displayed to screen. return windowHandle() ? windowHandle()->screen()->devicePixelRatio() : 1.0f;#else return 1.0f;#endif}
开发者ID:KitoHo,项目名称:citra,代码行数:8,
示例8: winIdvoid ExpoBlendingDlg::readSettings(){ KConfig config; KConfigGroup group = config.group("ExpoBlending Settings"); d->enfuseSettingsBox->readSettings(group); d->saveSettingsBox->readSettings(group); d->templateFileName->setText(group.readEntry("Template File Name", QString::fromLatin1("enfuse"))); winId(); KConfigGroup group2 = config.group("ExpoBlending Dialog"); KWindowConfig::restoreWindowSize(windowHandle(), group2); resize(windowHandle()->size());}
开发者ID:swatilodha,项目名称:digikam,代码行数:15,
示例9: psInitFramelessvoid Window::init() { psInitFrameless(); setWindowIcon(wndIcon); App::app()->installEventFilter(this); connect(windowHandle(), SIGNAL(windowStateChanged(Qt::WindowState)), this, SLOT(stateChanged(Qt::WindowState))); connect(windowHandle(), SIGNAL(activeChanged()), this, SLOT(checkHistoryActivation())); QPalette p(palette()); p.setColor(QPalette::Window, st::wndBG->c); setPalette(p); title = new TitleWidget(this); psInitSize();}
开发者ID:Nnamso,项目名称:tdesktop,代码行数:16,
示例10: QGLWidgetGLWidget::GLWidget(Map *map, QWidget *parent) : QGLWidget(QGLFormat(QGL::SampleBuffers), parent), _playMode(PlayMode_Pause), _map(map), _timer(new QTimer(this)), _idleTimer(new QTimer(this)), _fullScreen(false), _lockToLayer(false){ setObjectName("GLWidget"); if (_map == NULL) _map = new Map(); elapsedTimer.start(); connect(_map, SIGNAL(signalLayerAdded(LayerId)), this, SLOT(updateGL())); connect(_map, SIGNAL(signalLayerClicked(LayerId)), this, SLOT(slotLayerSelected(LayerId))); connect(_timer, SIGNAL(timeout()), this, SLOT(update())); connect(_map, SIGNAL(layerUpdated()), SLOT(slotRedrawWhenReady())); _timer->setInterval(Refresh_Interval); _idleTimer->setSingleShot(true); if (QWindow *window = windowHandle()) _viewCtx.setDevicePixelRatio(window->devicePixelRatio()); connect(_idleTimer, SIGNAL(timeout()), SLOT(updateGL()));}
开发者ID:idaohang,项目名称:RunParticles,代码行数:25,
示例11: callbackLRESULTRenderWindow::callback (HWND window, UINT msg, WPARAM wParam, LPARAM lParam){ if (windowHandle() == nullptr) return Window::callback (window, msg, wParam, lParam); // Send event message to AntTweakBar if (TwEventWin(window, msg, wParam, lParam)) { _rendererHasFocus = false; return 0; // Event has been handled by AntTweakBar } if (msg >= WM_MOUSEFIRST && msg <= WM_MBUTTONDBLCLK) { _rendererHasFocus = true; } switch (msg) { case WM_KEYDOWN: if(wParam == VK_ESCAPE) DestroyWindow(window); break; case WM_DESTROY: PostQuitMessage(0); break; } return Window::callback (window, msg, wParam, lParam);}
开发者ID:SNce,项目名称:IBLBaker,代码行数:34,
示例12: MenuBarvoid MainWindow::CreateComponents(){ m_menu_bar = new MenuBar(this); m_tool_bar = new ToolBar(this); m_game_list = new GameList(this); m_render_widget = new RenderWidget; m_stack = new QStackedWidget(this); m_controllers_window = new ControllersWindow(this); m_settings_window = new SettingsWindow(this); m_hotkey_window = new MappingWindow(this, 0); connect(this, &MainWindow::EmulationStarted, m_settings_window, &SettingsWindow::EmulationStarted); connect(this, &MainWindow::EmulationStopped, m_settings_window, &SettingsWindow::EmulationStopped);#if defined(HAVE_XRANDR) && HAVE_XRANDR m_graphics_window = new GraphicsWindow( new X11Utils::XRRConfiguration( static_cast<Display*>(QGuiApplication::platformNativeInterface()->nativeResourceForWindow( "display", windowHandle())), winId()), this);#else m_graphics_window = new GraphicsWindow(nullptr, this);#endif InstallHotkeyFilter(m_hotkey_window); InstallHotkeyFilter(m_controllers_window); InstallHotkeyFilter(m_settings_window); InstallHotkeyFilter(m_graphics_window);}
开发者ID:ToadKing,项目名称:dolphin,代码行数:32,
示例13: setWindowTitleToolBarControllerWidget::ToolBarControllerWidget() :QWidget(0){ setWindowTitle("QMacToolBar Test"); resize(400, 200); QMacToolBar *toolBar = new QMacToolBar(this); QIcon qtIcon(QStringLiteral(":qtlogo.png")); fooItem = toolBar->addItem(qtIcon, QStringLiteral("Foo")); fooItem->setText("foo"); connect(fooItem, SIGNAL(activated()), this, SLOT(activated())); QMacToolBarItem *item5 = toolBar->addAllowedItem(qtIcon, QStringLiteral("AllowedFoo")); connect(item5, SIGNAL(activated()), this, SLOT(activated())); QLineEdit *fooItemText = new QLineEdit(this); fooItemText->setText("Foo"); fooItemText->move(10, 10); connect(fooItemText, SIGNAL(textChanged(QString)), this, SLOT(changeItemText(QString))); winId(); toolBar->attachToWindow(windowHandle());}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:26,
|