• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ showDialog函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中showDialog函数的典型用法代码示例。如果您正苦于以下问题:C++ showDialog函数的具体用法?C++ showDialog怎么用?C++ showDialog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了showDialog函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: d_plot

LegendWidget::LegendWidget(Plot *plot):QWidget(plot),
	d_plot(plot),
	d_frame (0),
	d_angle(0),
	d_fixed_coordinates(false)
{
	setAttribute(Qt::WA_DeleteOnClose);

	d_text = new QwtText(QString::null, QwtText::RichText);
	d_text->setFont(QFont("Arial", 12, QFont::Normal, false));
	d_text->setRenderFlags(Qt::AlignTop|Qt::AlignLeft);
	d_text->setBackgroundBrush(QBrush(Qt::NoBrush));
	d_text->setColor(Qt::black);
	d_text->setBackgroundPen (QPen(Qt::NoPen));
	d_text->setPaintAttribute(QwtText::PaintBackground);

	h_space = 5;
	left_margin = 10;
	top_margin = 5;
	line_length = 20;

	QPoint pos = plot->canvas()->pos();
	pos = QPoint(pos.x() + 10, pos.y() + 10);
	move(pos);

    d_selector = NULL;

	connect (this, SIGNAL(showDialog()), plot->parent(), SIGNAL(viewTextDialog()));
	connect (this, SIGNAL(showMenu()), plot->parent(), SIGNAL(showMarkerPopupMenu()));
	connect (this, SIGNAL(enableEditor()), plot->parent(), SLOT(enableTextEditor()));

	setMouseTracking(true);
	show();
	setFocus();
}
开发者ID:jkrueger1,项目名称:mantid,代码行数:35,代码来源:LegendWidget.cpp


示例2: QTreeWidget

WorkspaceWidget::WorkspaceWidget(QWidget *parent) :
    QTreeWidget(parent)
{
    this->actionNewMaterial = new QAction("New Material", this);
    connect(actionNewMaterial,SIGNAL(triggered()),
            this, SLOT(showDialog()));
}
开发者ID:ironsteel,项目名称:QtOME,代码行数:7,代码来源:WorkspaceWidget.cpp


示例3: settings

void NSISUpdater::versionInfoArrived(const UpdateInfo &info)
{
    ConfigFile cfg;
    QSettings settings(cfg.configFile(), QSettings::IniFormat);
    qint64 infoVersion = Helper::stringVersionToInt(info.version());
    qint64 seenVersion = Helper::stringVersionToInt(settings.value(seenVersionC).toString());
    qint64 currVersion = Helper::currentVersionToInt();
    if (info.version().isEmpty()
        || infoVersion <= currVersion
        || infoVersion <= seenVersion) {
        qCInfo(lcUpdater) << "Client is on latest version!";
        setDownloadState(UpToDate);
    } else {
        QString url = info.downloadUrl();
        qint64 autoUpdateFailedVersion =
            Helper::stringVersionToInt(settings.value(autoUpdateFailedVersionC).toString());
        if (url.isEmpty() || _showFallbackMessage || infoVersion == autoUpdateFailedVersion) {
            showDialog(info);
        }
        if (!url.isEmpty()) {
            _targetFile = cfg.configPath() + url.mid(url.lastIndexOf('/'));
            if (QFile(_targetFile).exists()) {
                setDownloadState(DownloadComplete);
            } else {
                QNetworkReply *reply = qnam()->get(QNetworkRequest(QUrl(url)));
                connect(reply, &QIODevice::readyRead, this, &NSISUpdater::slotWriteFile);
                connect(reply, &QNetworkReply::finished, this, &NSISUpdater::slotDownloadFinished);
                setDownloadState(Downloading);
                _file.reset(new QTemporaryFile);
                _file->setAutoRemove(true);
                _file->open();
            }
        }
    }
}
开发者ID:msphn,项目名称:client,代码行数:35,代码来源:ocupdater.cpp


示例4: onSaveHistory

void Server::onClientDisconnected(QString message)
{
    clients->removeOne((Client*)sender());
    onSaveHistory(message);
    sendMessageToAll(message);
    emit showDialog(message);
}
开发者ID:SolidJack,项目名称:MyChat,代码行数:7,代码来源:server.cpp


示例5: switch

int MainWindowImpl::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: frameSignal(); break;
        case 1: resetTxSignal(); break;
        case 2: showDialog(); break;
        case 3: deleteItem(); break;
        case 4: uploadItem(); break;
        case 5: saveItem(); break;
        case 6: setPathDialog(); break;
        case 7: startAnimation(); break;
        case 8: setanimationtime(); break;
        case 9: animationFinished(); break;
        case 10: showAddCursorDialog(); break;
        case 11: showAddEllipseDialog(); break;
        case 12: animationslidertime((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 13: opacitySliderImpl((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 14: showConfigureDialog(); break;
        case 15: startTx(); break;
        case 16: restartPacketTimer(); break;
        case 17: resetTx(); break;
        case 18: showDebugWindow(); break;
        case 19: showAboutQMTSim(); break;
        case 20: showReadme(); break;
        case 21: viewButtonSlot(); break;
        case 22: showResizeDialog(); break;
        }
        _id -= 23;
    }
    return _id;
}
开发者ID:Kanoniba,项目名称:tuio-simulator,代码行数:35,代码来源:moc_mainwindowimpl.cpp


示例6: grid_text

DragValueCtrl* grid_text(wxWindow* parent,
  wxSizer* sizer,
  winvec_t& showhide,
  const Art& art,
  StatusInterface& statusInfo,
  const DialogFunc& showDialog)
{
  // Create the drag-adjustable grid spacing text

  auto text = make_wx<DragValueCtrl>(parent,
    IntRange(min_t(1)),
    Description(
     "Grid: Drag to adjust spacing. "
     "Right-Click to disable. "
     "Double-click for dialog"),
    DragCursor(art.Get(Cursor::DRAG_SCALE)),
    HoverCursor(art.Get(Cursor::MOVE_POINT)),
    statusInfo);
  showhide.push_back(text);
  text->Hide();

  events::on_mouse_left_double_click(text,
    [=](const IntPoint&){
      showDialog();
    });

  sizer->Add(text, 0, wxALIGN_CENTER_VERTICAL);
  return text;
}
开发者ID:lukas-ke,项目名称:faint-graphics-editor,代码行数:29,代码来源:grid-ctrl.cpp


示例7: SLOT

void AdBlockIcon::createMenu(QMenu* menu) {
  if (!menu) {
    menu = qobject_cast<QMenu*>(sender());

    if (!menu) {
      return;
    }
  }

  menu->clear();
  AdBlockCustomList* customList = m_manager->customList();
  WebPage* page = qApp->mainForm()->tabWidget()->currentWidget()->webBrowser()->viewer()->page();
  const QUrl pageUrl = page->url();

  menu->addAction(tr("Show AdBlock &settings"), m_manager, SLOT(showDialog()));
  menu->addSeparator();

  if (!pageUrl.host().isEmpty() && m_enabled && m_manager->canRunOnScheme(pageUrl.scheme())) {
    const QString host = page->url().host().contains(QLatin1String("www.")) ? pageUrl.host().mid(4) : pageUrl.host();
    const QString hostFilter = QString("@@||%1^$document").arg(host);
    const QString pageFilter = QString("@@|%1|$document").arg(pageUrl.toString());
    QAction* act = menu->addAction(tr("Disable on %1").arg(host));

    act->setCheckable(true);
    act->setChecked(customList->containsFilter(hostFilter));
    act->setData(hostFilter);
    connect(act, SIGNAL(triggered()), this, SLOT(toggleCustomFilter()));
    act = menu->addAction(tr("Disable only on this page"));
    act->setCheckable(true);
    act->setChecked(customList->containsFilter(pageFilter));
    act->setData(pageFilter);
    connect(act, SIGNAL(triggered()), this, SLOT(toggleCustomFilter()));
    menu->addSeparator();
  }
}
开发者ID:martinrotter,项目名称:rssguard,代码行数:35,代码来源:adblockicon.cpp


示例8: showDialog

bool FileChooser::browseForMultipleFilesOrDirectories (FilePreviewComponent* previewComp)
{
    return showDialog (FileBrowserComponent::openMode
                        | FileBrowserComponent::canSelectFiles
                        | FileBrowserComponent::canSelectDirectories
                        | FileBrowserComponent::canSelectMultipleItems,
                       previewComp);
}
开发者ID:COx2,项目名称:PizzaKnobFilter,代码行数:8,代码来源:juce_FileChooser.cpp


示例9: showDialog

void SearchController::findNext()
{
    if( mTool->searchData().isEmpty() )
        showDialog( FindForward );
    else
        mTool->search( FindForward, true, false );
;
}
开发者ID:KDE,项目名称:okteta,代码行数:8,代码来源:searchcontroller.cpp


示例10: moveToCenter

void TownSprite::onTouchEnded(Touch* pTouch, Event* pEvent)
{
    this->setScale(1.0f);
    
    if (_delta <= LIMIT_DELTA) {
        moveToCenter();
        showDialog();
    }
}
开发者ID:CYber520CM,项目名称:Cocos_Ring,代码行数:9,代码来源:TownSprite.cpp


示例11: m_action

MolecularProperties::MolecularProperties(QObject *parent_) :
  Avogadro::QtGui::ExtensionPlugin(parent_),
  m_action(new QAction(this)),
  m_dialog(NULL),
  m_molecule(NULL)
{
  m_action->setEnabled(true);
  m_action->setText("&Molecular Properties...");
  connect(m_action, SIGNAL(triggered()), SLOT(showDialog()));
}
开发者ID:AlbertDeFusco,项目名称:avogadrolibs,代码行数:10,代码来源:molecularproperties.cpp


示例12: QDialog

Options::Options(QWidget *parent) :
    QDialog(parent),ui(new Ui::Options)
{
    ui->setupUi(this);
    connect(ui->buttonBox,SIGNAL(rejected()),this,SLOT(reject()));
    connect(ui->buttonBox,SIGNAL(accepted()),this,SLOT(accept()));
    connect(ui->p2cRadio,SIGNAL(toggled(bool)),this,SLOT(changeTitles(bool)));

    showDialog();
}
开发者ID:silvergit,项目名称:QtTicTacToe,代码行数:10,代码来源:options.cpp


示例13: showDialog

bool LabDialog::init()
{
    if ( !Layer::init() ) {
        return false;
    }
    
    this->setScale(0.0f);
    showDialog();

    return true;
}
开发者ID:CYber520CM,项目名称:Cocos_Ring,代码行数:11,代码来源:LabDialog.cpp


示例14: showDialog

		void CSimple3DView::deleteVisualObjectCB()
		{
			gint l_i32Response = showDialog(m_pDeleteObjectTable, "Delete an object");

			if(l_i32Response == GTK_RESPONSE_ACCEPT)
			{
				const gchar* l_pDeleteObjectName = gtk_entry_get_text(m_pDeleteObjectName);

				m_rSimple3DDatabase.deleteVisualObject(l_pDeleteObjectName);
			}
		}
开发者ID:Akanoa,项目名称:PRI,代码行数:11,代码来源:ovpCSimple3DView.cpp


示例15: Client

void Server::incomingConnection(qintptr socketDescriptor)
{
    Client *client = new Client(socketDescriptor);
    clients->push_back(client);
    QObject::connect(client,SIGNAL(sendMessageToAll(QString)),this,SLOT(sendMessageToAll(QString)));
    QObject::connect(client,SIGNAL(showDialog(QString)),this,SLOT(onShowDialog(QString)));
    QObject::connect(client,SIGNAL(signalDisconnected(QString)),this,SLOT(onClientDisconnected(QString)));
    QObject::connect(client,SIGNAL(signalConnected(QString)),this,SLOT(onClientConnected(QString)));
    QObject::connect(client,SIGNAL(saveHistory(QString)),this,SLOT(onSaveHistory(QString)));
    QObject::connect(client,SIGNAL(getHistory()),this,SLOT(onGetHistory(Client*)));
    onGetHistory(client);
}
开发者ID:SolidJack,项目名称:MyChat,代码行数:12,代码来源:server.cpp


示例16: AddRoomDialog

void ChannelsView::addRoom()
{
  AddRoomDialog *dialog = new AddRoomDialog(this);

# if QT_VERSION >= 0x050000
  connect(dialog, &AddRoomDialog::create, this, &ChannelsView::create);
# else
  connect(dialog, SIGNAL(create(QString,QString,bool)), SLOT(create(QString,QString,bool)));
# endif

  showDialog(dialog);
}
开发者ID:Artanomell,项目名称:schat,代码行数:12,代码来源:ChannelsView.cpp


示例17: QWidget

QgsUnitSelectionWidget::QgsUnitSelectionWidget( QWidget *parent )
    : QWidget( parent )
{
  mMapUnitIdx = -1;
  mUnitScaleDialog = new QgsMapUnitScaleDialog( this );

  setupUi( this );
  mMapScaleButton->setVisible( false );

  connect( mUnitCombo, SIGNAL( currentIndexChanged( int ) ), this, SLOT( toggleUnitRangeButton() ) );
  connect( mMapScaleButton, SIGNAL( clicked() ), this, SLOT( showDialog() ) );
  connect( mUnitCombo, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( changed() ) );
}
开发者ID:Jokenbol,项目名称:QGIS,代码行数:13,代码来源:qgsunitselectionwidget.cpp


示例18: Color_Preview

Color_Selector::Color_Selector(QWidget *parent) :
    Color_Preview(parent), p(new Private(this))
{
    setUpdateMode(Continuous);
    p->old_color = color();

    connect(this,SIGNAL(clicked()),this,SLOT(showDialog()));
    connect(this,SIGNAL(colorChanged(QColor)),this,SLOT(update_old_color(QColor)));
    connect(p->dialog,SIGNAL(rejected()),this,SLOT(reject_dialog()));
    connect(p->dialog,SIGNAL(colorSelected(QColor)), this, SLOT(accept_dialog()));

    setAcceptDrops(true);
}
开发者ID:chchwy,项目名称:Qt-Color-Picker,代码行数:13,代码来源:color_selector.cpp


示例19: showDialog

void MenuFolder::loadOrOpen() {
    if (mCursor == 0) {
        if (initialize(mapFolder->getParent().getPath()) != 0) {
            showDialog("Error reading parent folder!", "OK", "");
        }
    } else if ((mCursor - 1) < mapFolder->folderCount()) {
        if (initialize(mapFolder->getFolder(mCursor - 1).getPath()) != 0) {
            showDialog("Error reading subfolder!", "OK", "");
        }
    } else {
        std::string tmp = "load ";
        tmp += mapFolder->getFile((unsigned long)mCursor - 1 - mapFolder->folderCount()).getPath();
        int error = getOpenRaider().command(tmp.c_str());
        if (error == 0) {
            setVisible(false);
        } else {
            std::ostringstream err;
            err << "Error loading map: " << error << "!";
            showDialog(err.str(), "OK", "");
        }
    }
}
开发者ID:prodigeni,项目名称:OpenRaider,代码行数:22,代码来源:MenuFolder.cpp


示例20: enableEditor

void LegendWidget::showTextEditor()
{
    ApplicationWindow *app = d_plot->multiLayer()->applicationWindow();
    if (!app)
        return;

	d_plot->deselect(this);

	if (app->d_in_place_editing)
        enableEditor();
    else
        showDialog();
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:13,代码来源:LegendWidget.cpp



注:本文中的showDialog函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ showErrorDialog函数代码示例发布时间:2022-05-30
下一篇:
C++ showDetails函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap