这篇教程C++ topLevelWidget函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中topLevelWidget函数的典型用法代码示例。如果您正苦于以下问题:C++ topLevelWidget函数的具体用法?C++ topLevelWidget怎么用?C++ topLevelWidget使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了topLevelWidget函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: changing/*! /internal /fn void PhoneLauncherView::selectionChangedHandler(GridItem *item) Called in response to the current item changing (i.e. SelectedItem has shifted position, highlight a different GridItem object). Updates the window title, and emits the signal highlighted(...). Signals emitted: /l{function}{highlighted(QContent)}.*/void PhoneLauncherView::selectionChangedHandler(GridItem *item){ if ( !item ) { qWarning("PhoneLauncherView::selectionChangedHandler(...): Error - item parameter is null."); // Set the title to a space rather than an empty string. This causes the title bar to // remain the same, but just without a title. An empty string will cause a different kind of // title bar to appear. if (!Qtopia::mousePreferred()) topLevelWidget()->setWindowTitle(" "); return; } if ( !(item->content()) ) { // Set the title to a space rather than an empty string. This causes the title bar to // remain the same, but just without a title. An empty string will cause a different kind of // title bar to appear. if (!Qtopia::mousePreferred()) topLevelWidget()->setWindowTitle(" "); return; } emit highlighted(*(item->content())); if (!Qtopia::mousePreferred()) topLevelWidget()->setWindowTitle(item->content()->name());}
开发者ID:Camelek,项目名称:qtmoko,代码行数:33,
示例2: topLevelWidgetvoid BasicTab::slotCapturedShortcut(const TDEShortcut& cut){ if (signalsBlocked()) return; if( KKeyChooser::checkGlobalShortcutsConflict( cut, true, topLevelWidget()) || KKeyChooser::checkStandardShortcutsConflict( cut, true, topLevelWidget())) return; if ( KHotKeys::present() ) { if (!_menuEntryInfo->isShortcutAvailable( cut ) ) { KService::Ptr service; emit findServiceShortcut(cut, service); if (!service) service = KHotKeys::findMenuEntry(cut.toString()); if (service) { KMessageBox::sorry(this, i18n("<qt>The key <b>%1</b> can not be used here because it is already used to activate <b>%2</b>.").arg(cut.toString(), service->name())); return; } else { KMessageBox::sorry(this, i18n("<qt>The key <b>%1</b> can not be used here because it is already in use.").arg(cut.toString())); return; } } _menuEntryInfo->setShortcut( cut ); } _keyEdit->setShortcut(cut, false); if (_menuEntryInfo) emit changed( _menuEntryInfo );}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:34,
示例3: QWidgetPopup::Popup(QWidget* text, QButton* button, QWidget* parent, const char* name) : QWidget(parent, name){ _text = text; _button = button; _popup = NULL; text->reparent(this, 0, QPoint()); if (text->inherits("LineEdit")) connect(text, SIGNAL(validData()), SIGNAL(validData())); button->reparent(this, 0, QPoint()); connect(button, SIGNAL(clicked()), SLOT(openPopup())); if (topLevelWidget()) topLevelWidget()->installEventFilter(this); text->installEventFilter(this); setFocusProxy(text); setFocusPolicy(StrongFocus); QGridLayout* grid = new QGridLayout(this); grid->setColStretch(0, 1); grid->addWidget(text, 0, 0); grid->addWidget(button, 0, 1, AlignLeft | AlignVCenter); setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));}
开发者ID:cwarden,项目名称:quasar,代码行数:28,
示例4: setMessagevoid UserWnd::setMessage(Message **msg){ bool bSetFocus = false; Container *container = NULL; if (topLevelWidget() && topLevelWidget()->inherits("Container")){ container = static_cast<Container*>(topLevelWidget()); if (container->wnd() == this) bSetFocus = true; } if (!m_edit->setMessage(*msg, bSetFocus)){ delete *msg; *msg = new Message(MessageGeneric); m_edit->setMessage(*msg, bSetFocus); } if (container){ container->setMessageType((*msg)->baseType()); container->contactChanged(getContacts()->contact(m_id)); } if ((m_view == NULL) || ((*msg)->id() == 0)) return; if (m_view->findMessage(*msg)) return; m_view->addMessage(*msg); if (!m_view->hasSelectedText()) m_view->scrollToBottom();}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:28,
示例5: setWinFontvoid FontEdit::chooseFont(){#ifdef USE_KDE QFont _f = f; if (KFontDialog::getFont(_f, false, topLevelWidget()) == KFontDialog::Accepted) setWinFont(_f);#else bool ok = false; QFont _f = QFontDialog::getFont(&ok, f, topLevelWidget()); if (ok) setWinFont(_f);#endif}
开发者ID:BackupTheBerlios,项目名称:sim-im-svn,代码行数:12,
示例6: createDockAdvancedvoid TB_TeamBody::advancedClicked(int index, bool separateWindow){ if(!dockAdvanced()) { createDockAdvanced(separateWindow); dockAdvanced()->setCurrentPokemon(index); } else { int width = m_dockAdvanced->width(); m_dockAdvanced->close(); if (!advSepWindow) topLevelWidget()->resize(topLevelWidget()->width()- width, topLevelWidget()->height()); }}
开发者ID:Airisu,项目名称:pokemon-online,代码行数:13,
示例7: topLevelWidget/*! /internal /fn void PhoneLauncherView::focusInEvent(QFocusEvent *event) Ensures that when the PhoneLauncherView is focused after an activity such as launching an application, the current icon will animate.*/void PhoneLauncherView::focusInEvent(QFocusEvent *event){ QGraphicsView::focusInEvent(event); if ( selectedItem && event->reason() != Qt::PopupFocusReason && !Qtopia::mousePreferred()) { selectedItem->startAnimating(); } if (Qtopia::mousePreferred()) topLevelWidget()->setWindowTitle(tr("Main Menu")); else if (currentItem()) topLevelWidget()->setWindowTitle(currentGridItem()->content()->name());}
开发者ID:Camelek,项目名称:qtmoko,代码行数:19,
示例8: ifbool SidebarExtension::eventFilter( TQObject *, TQEvent *e ) { if (e->type()==TQEvent::MouseButtonPress) { m_resizing=true; m_x=((TQMouseEvent*)e)->globalX(); return true; } else if (e->type()==TQEvent::MouseButtonRelease) { m_resizing=false; m_expandedSize=topLevelWidget()->width(); needLayoutUpdate(true); return true; } else if (e->type()==TQEvent::MouseMove) { if (m_resizing) { Position p=position(); if (p==Left) { int diff=((TQMouseEvent*)e)->globalX()-m_x; if (abs(diff)>3) { topLevelWidget()->setFixedWidth(topLevelWidget()->width()+diff); m_x=((TQMouseEvent*)e)->globalX(); } } else if (p==Right) { int diff=((TQMouseEvent*)e)->globalX()-m_x; if (abs(diff)>3) { topLevelWidget()->setFixedWidth(topLevelWidget()->width()-diff); topLevelWidget()->move(topLevelWidget()->x()+diff,topLevelWidget()->y()); m_x=((TQMouseEvent*)e)->globalX(); } } return true; } } return false;}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:32,
示例9: topLevelWidgetvoid QWidget::setActiveWindow(){ QWidget *tlw = topLevelWidget(); if ( tlw->isVisible() ) { qwsDisplay()->requestFocus( tlw->winId(), TRUE); }}
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:7,
示例10: updateRequestedRegionvoid QWidget::showWindow(){ if ( testWFlags(WType_TopLevel) ) { updateRequestedRegion( mapToGlobal(QPoint(0,0)) ); QRegion r( req_region );#ifndef QT_NO_QWS_MANAGER if ( extra && extra->topextra && extra->topextra->qwsManager ) { QRegion wmr = extra->topextra->qwsManager->region(); wmr = qt_screen->mapToDevice( wmr, QSize(qt_screen->width(), qt_screen->height()) ); r += wmr; }#endif qwsDisplay()->requestRegion(winId(), r); if ( !testWFlags(WStyle_Tool) ) { qwsDisplay()->requestFocus(winId(),TRUE); } qwsDisplay()->setAltitude( winId(), testWFlags(WStyle_StaysOnTop) ? 1 : 0, TRUE ); } else if ( !topLevelWidget()->in_show ) { updateRequestedRegion( mapToGlobal(QPoint(0,0)) ); QWidget *p = parentWidget(); p->setChildrenAllocatedDirty( geometry(), this ); p->paintable_region_dirty = TRUE; p->overlapping_children = -1; paint_heirarchy( this, TRUE ); }}
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:28,
示例11: i18nbool DockContainer::dockModule(ConfigModule *module){ if(module == _module) return true; if(_module && _module->isChanged()) { int res = KMessageBox::warningYesNoCancel(this, module ? i18n("There are unsaved changes in the active module./n" "Do you want to apply the changes before running " "the new module or discard the changes?") : i18n("There are unsaved changes in the active module./n" "Do you want to apply the changes before exiting " "the Control Center or discard the changes?"), i18n("Unsaved Changes"), KStdGuiItem::apply(), KStdGuiItem::discard()); if(res == KMessageBox::Yes) _module->module()->applyClicked(); if(res == KMessageBox::Cancel) return false; } raiseWidget(_busyw); kapp->processEvents(); deleteModule(); if(!module) return true; ProxyWidget *widget = loadModule(module); KCGlobal::repairAccels(topLevelWidget()); return (widget != 0);}
开发者ID:serghei,项目名称:kde3-kdebase,代码行数:33,
示例12: QWidget/*! Constructs a resize corner called /a name, as a child widget of /a parent.*/QSizeGrip::QSizeGrip( QWidget * parent, const char* name ) : QWidget( parent, name ){#ifndef QT_NO_CURSOR#ifndef Q_WS_MAC if ( QApplication::reverseLayout() ) setCursor( sizeBDiagCursor ); else setCursor( sizeFDiagCursor );#endif#endif setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );#if defined(Q_WS_X11) if ( !qt_sizegrip_workspace( this ) ) { WId id = winId(); XChangeProperty(qt_xdisplay(), topLevelWidget()->winId(), qt_sizegrip, XA_WINDOW, 32, PropModeReplace, (unsigned char *)&id, 1); }#endif tlw = qt_sizegrip_topLevelWidget( this ); if ( tlw ) tlw->installEventFilter( this ); installEventFilter( this ); //for binary compatibility fix in 4.0 with an event() ###}
开发者ID:AliYousuf,项目名称:abanq-port,代码行数:29,
示例13: ctkMenuButtonTest1//-----------------------------------------------------------------------------int ctkMenuButtonTest1(int argc, char * argv [] ){ QApplication app(argc, argv); QWidget topLevelWidget(0); QMenu* menu = new QMenu("menu"); menu->addAction("extra choice 1"); menu->addAction("extra choice 2"); menu->addAction("extra choice 3"); QPushButton button1("QPushButton with no menu"); QPushButton button2("QPushButton with menu"); button2.setMenu(menu); ctkMenuButton button3("ctkMenuButton with no menu"); ctkMenuButton button4("ctkMenuButton with menu"); button4.setMenu(menu); QVBoxLayout* layout = new QVBoxLayout; layout->addWidget(&button1); layout->addWidget(&button2); layout->addWidget(&button3); layout->addWidget(&button4); topLevelWidget.setLayout(layout); topLevelWidget.show(); topLevelWidget.resize(200, 100); if (argc < 2 || QString(argv[1]) != "-I" ) { QTimer::singleShot(200, &app, SLOT(quit())); } return app.exec();}
开发者ID:151706061,项目名称:CTK,代码行数:35,
示例14: QmvQueryWidget//--------------------------------------------------------------------------------void QmvQueryWidget::advancedQuery(){ static QmvQueryWidget * aq; if ( !dialog_advqry ) { aq = new QmvQueryWidget( this, this, "advanced query" ); dialog_advqry = aq->getAdvancedDialog(); dialog_advqry->move( mapToGlobal( QPoint( topLevelWidget()->width() - 400, 0) ) ); } // update adv from simple aq->getCondition(0)->update(); // activate all conditions for ( int row = 0; row < query_object->countConditions(); row++ ) query_object->getCondition( row )->setActive(TRUE); // Run the advanced query dialog_advqry->exec(); // update simple from adv getCondition(0)->update(); // deactivate all other than first condition for ( int row = 1; row < query_object->countConditions(); row++ ) query_object->getCondition( row )->setActive(FALSE); }
开发者ID:py1668,项目名称:xpracman-qt2-final,代码行数:26,
示例15: QvisWizardQvisScatterPlotWizard::QvisScatterPlotWizard(AttributeSubject *s, QWidget *parent, const std::string &var_name): QvisWizard(s, parent){ setOption(QWizard::NoCancelButton, false); setOption(QWizard::HaveHelpButton, false); setOption(QWizard::HaveNextButtonOnLastPage, false); setOption(QWizard::NoBackButtonOnLastPage, true); // Set some defaults into the wizard's local copy of the plot attributes. scatterAtts->SetVar1Role(ScatterAttributes::Coordinate0); scatterAtts->SetVar2("default"); scatterAtts->SetVar2Role(ScatterAttributes::Coordinate1); scatterAtts->SetVar3("default"); scatterAtts->SetVar3Role(ScatterAttributes::Coordinate2); scatterAtts->SetVar4("default"); scatterAtts->SetVar4Role(ScatterAttributes::Color); // Set the wizard's title. topLevelWidget()->setWindowTitle(tr("Scatter Plot Setup")); // // Create the main wizard page. // mainPage = new QvisScatterPlotWizardPage(s,this,var_name); addPage(mainPage); mainPage->setFinalPage(true);}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:30,
示例16: topLevelWidgetvoid GeneralSettings::slotOpenAccountWizard(){ if (QSystemTrayIcon::isSystemTrayAvailable()) { topLevelWidget()->close(); } OwncloudSetupWizard::runWizard(qApp, SLOT(slotownCloudWizardDone(int)), 0);}
开发者ID:SnakeSolidNL,项目名称:client,代码行数:7,
示例17: widthvoid OverlayWidget::reposition(){ if ( !mAlignWidget ) return; // p is in the alignWidget's coordinates QPoint p; // We are always above the alignWidget, right-aligned with it. p.setX(mAlignWidget->width() - width()); p.setY(-height()); // Position in the toplevelwidget's coordinates QPoint pTopLevel = mAlignWidget->mapTo(topLevelWidget(), p); // Position in the widget's parentWidget coordinates QPoint pParent = parentWidget()->mapFrom(topLevelWidget(), pTopLevel); // Move 'this' to that position. move(pParent);}
开发者ID:KDE,项目名称:digikam,代码行数:17,
注:本文中的topLevelWidget函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ top_level_interpreter_data函数代码示例 C++ topLevelItemCount函数代码示例 |