本文整理汇总了C++中showPopup函数的典型用法代码示例。如果您正苦于以下问题:C++ showPopup函数的具体用法?C++ showPopup怎么用?C++ showPopup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showPopup函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showPopup
bool DocumentWindow::loadDocument(const QString& path)
{
if (!closeDocument())
{
return false;
}
const QFile::FileError loading = m_document.loadFromFile(path);
if (loading != QFile::NoError)
{
showPopup(tr("Error"), tr("Failed to load file: %1").arg(path));
return false;
}
m_path = path;
m_synchronized = true;
setWindowTitle(separateName(path));
setDocumentModel();
emit documentLoaded(path);
return true;
}
示例2: beginDragAutoRepeat
void ComboBox::mouseDrag (const MouseEvent& e)
{
beginDragAutoRepeat (50);
if (isButtonDown && ! e.mouseWasClicked())
showPopup();
}
示例3: getSelectedItemIndex
//==============================================================================
bool ComboBox::keyPressed (const KeyPress& key)
{
if (key.isKeyCode (KeyPress::upKey) || key.isKeyCode (KeyPress::leftKey))
{
int index = getSelectedItemIndex() - 1;
while (index >= 0 && ! selectIfEnabled (index))
--index;
return true;
}
else if (key.isKeyCode (KeyPress::downKey) || key.isKeyCode (KeyPress::rightKey))
{
int index = getSelectedItemIndex() + 1;
while (index < getNumItems() && ! selectIfEnabled (index))
++index;
return true;
}
else if (key.isKeyCode (KeyPress::returnKey))
{
showPopup();
return true;
}
return false;
}
示例4: QMainWindow
menix::menix(QWidget *parent) :
QMainWindow(parent),
m_ui(new Ui::menix) {
m_ui->setupUi(this);
QToolBar *toolbarIconos = addToolBar(tr("Iconos"));
toolbarIconos->addAction(QIcon(":/preferences-system.png"),"Opciones",this,SLOT( abrirOpciones() ) );
toolbarIconos->addAction(QIcon(":/terminal.png"),"Debug",this,SLOT(abrirDebug()));
opciones = new opcionesGlobales();
numero = opciones->NumeroDestino();
puerto = opciones->Puerto();
pin = opciones->Pin();
centro = opciones->CentroMensajes();
fixok = opciones->Fixok();
ips = new QStringList( opciones->Ips() );
file = new QFile( opciones->fileLog() );
file->open( QIODevice::WriteOnly | QIODevice::Text );
flog = new QTextStream( file );
mensaje = new smsat(centro,puerto,flog,pin,fixok);
crearAcciones();
crearBandeja();
// testPuerto( mensaje );
Server *tcp = new Server(ips,this);
connect(tcp,SIGNAL(sendMessage(QString)),this,SLOT(sendMessage(QString)));
connect(mensaje,SIGNAL(sendAt(QString)),this,SLOT(sendedMessage(QString)));
connect(mensaje,SIGNAL(displayMsg(QString)),this,SLOT(showPopup(QString)));
}
示例5: setFrameRect
void PopupContainer::showInRect(const FloatQuad& controlPosition, const IntSize& controlSize, FrameView* v, int index)
{
// The controlSize is the size of the select box. It's usually larger than
// we need. Subtract border size so that usually the container will be
// displayed exactly the same width as the select box.
m_listBox->setBaseWidth(max(controlSize.width() - borderSize * 2, 0));
m_listBox->updateFromElement();
// We set the selected item in updateFromElement(), and disregard the
// index passed into this function (same as Webkit's PopupMenuWin.cpp)
// FIXME: make sure this is correct, and add an assertion.
// ASSERT(popupWindow(popup)->listBox()->selectedIndex() == index);
// Save and convert the controlPosition to main window coords. Each point is converted separately
// to window coordinates because the control could be in a transformed webview and then each point
// would be transformed by a different delta.
m_controlPosition.setP1(v->contentsToWindow(IntPoint(controlPosition.p1().x(), controlPosition.p1().y())));
m_controlPosition.setP2(v->contentsToWindow(IntPoint(controlPosition.p2().x(), controlPosition.p2().y())));
m_controlPosition.setP3(v->contentsToWindow(IntPoint(controlPosition.p3().x(), controlPosition.p3().y())));
m_controlPosition.setP4(v->contentsToWindow(IntPoint(controlPosition.p4().x(), controlPosition.p4().y())));
m_controlSize = controlSize;
// Position at (0, 0) since the frameRect().location() is relative to the
// parent WebWidget.
setFrameRect(IntRect(IntPoint(), controlSize));
showPopup(v);
}
示例6: QKeySequence
void QxtLookupLineEdit::keyPressEvent ( QKeyEvent * event )
{
QKeySequence currSeq = QKeySequence(event->key() | event->modifiers());
if(currSeq.matches(qxt_d().m_trigger))
showPopup ();
else
QLineEdit::keyPressEvent(event);
}
示例7: showPopup
//==============================================================================
void ComboBox::showPopupIfNotActive()
{
if (! menuActive)
{
menuActive = true;
showPopup();
}
}
示例8: qDebug
/**
* @brief Slot connected to MarblePopupItem::editAlbumSignal
* @param p_marker_id
* @param p_album_id
*/
void MarbleMap::editAlbumSlot(int p_marker_id, int p_album_id)
{
#ifdef DBG_MARBLE_MAP
qDebug() << "MarbleMap::editAlbumSlot(" << p_marker_id << "," << p_album_id << ")";
#endif
destroyPopup();
showPopup(m_current_marker, EDIT_ALBUM, p_album_id);
}
示例9: showPopup
void StackFolder::timerEvent(QTimerEvent *event)
{
if (event->timerId() == m_delayedShowTimer.timerId()) {
m_delayedShowTimer.stop();
showPopup();
}
Plasma::PopupApplet::timerEvent(event);
}
示例10: hidePopup
void pTreeComboBox::mousePressEvent( QMouseEvent* event )
{
if ( mView ) {
mFrame->isVisible() ? hidePopup() : showPopup();
}
QWidget::mousePressEvent( event );
}
示例11: showPopup
void GameScene::buyTimer(CCObject* pSender ,cocos2d::ui::TouchEventType type) {
if (type == cocos2d::ui::TOUCH_EVENT_ENDED) {
if(GameManager::getXu() >= 3) {
//buy xu
GameManager::addXu(-3);
GameManager::addTimer(2);
showPopup(popupBuyItem,false);
validateTimer();
lb_xu->setText(Utils::convertIntToChar(GameManager::getXu()));
} else {
//native jni call function
// Utils::sendSms5k("callbackSMS");
showPopup(popupBuyItem,false);
}
}
}
示例12: findById
void QuickOpenManager::showById(const QString &id)
{
IQuickOpen *i = findById(id);
if (i) {
setCurrentFilter(i);
showPopup();
}
}
示例13: showPopup
void QFontComboBox_QtDShell::__override_showPopup(bool static_call)
{
if (static_call) {
QComboBox::showPopup();
} else {
showPopup();
}
}
示例14: showPopup
bool PHIAComboBox::event( QEvent *e )
{
if ( e->type()==QEvent::MouseButtonPress || e->type()==QEvent::MouseButtonDblClick ) {
showPopup();
e->ignore();
return true;
}
return QComboBox::event( e );
}
示例15: beginDragAutoRepeat
//==============================================================================
void ComboBox::mouseDown (const MouseEvent& e)
{
beginDragAutoRepeat (300);
isButtonDown = isEnabled() && ! e.mods.isPopupMenu();
if (isButtonDown && (e.eventComponent == this || ! label->isEditable()))
showPopup();
}