当前位置: 首页>>代码示例>>C++>>正文


C++ MyDialog类代码示例

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


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

示例1: on_pushButton_clicked

void Dialog::on_pushButton_clicked()
{
   MyDialog dialog;
   dialog.setModal(true);
   dialog.exec();

}
开发者ID:abrarShariar,项目名称:Excel_Qt_interaction,代码行数:7,代码来源:dialog.cpp

示例2: MyDialog

bool QxmlApp::OnInit()
{
////@begin QxmlApp initialisation
    // Remove the comment markers above and below this block
    // to make permanent changes to the code.

    MyDialog *dialog = new MyDialog(NULL,-1,"QXML",wxPoint(50,50), wxSize(450,350),wxDEFAULT_DIALOG_STYLE);


#if wxUSE_XPM
    wxImage::AddHandler( new wxXPMHandler );
#endif
#if wxUSE_LIBPNG
    wxImage::AddHandler( new wxPNGHandler );
#endif
#if wxUSE_LIBJPEG
    wxImage::AddHandler( new wxJPEGHandler );
#endif
#if wxUSE_GIF
    wxImage::AddHandler( new wxGIFHandler );
#endif
////@end QxmlApp initialisation
    if (dialog->ShowModal() == wxID_OK)
    {

    }
    dialog->Destroy();
    return true;
}
开发者ID:BackupTheBerlios,项目名称:qedo-svn,代码行数:29,代码来源:qxmlApp.cpp

示例3: main

//---------------------------------------------------------------------------
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    MyDialog windowTop;

    windowTop.show();
    return app.exec();
}
开发者ID:HSR-Stud,项目名称:PMSwEng,代码行数:10,代码来源:main.cpp

示例4: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hp, LPSTR cmdLine, int nShow)
{
	MyDialog dlg;
	GetCursorPos(&dlg.p);
	if(dlg.DoModal(hInstance, NULL) == IDOK){	
		
		SetCursorPos(dlg.p.x,dlg.p.y);
	}
	return 0;
}
开发者ID:zugcic,项目名称:v03,代码行数:10,代码来源:main.cpp

示例5: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MyWidget w;
    MyDialog dialog; //新建MyDialog类对象
    if(dialog.exec() == QDialog::Accepted){ //判断dialog执行结果
        w.show();         //如果是按下了“进入主界面”按钮,则显示主界面
        return a.exec(); //程序正常运行
    }
    else return 0;   //否则,退出程序
}
开发者ID:Rookiee,项目名称:Qt_Codes,代码行数:11,代码来源:main.cpp

示例6: on_addReminder_clicked

void Remind::on_addReminder_clicked()//if add reminder button clicked shoots up a dialog to add a reminder
{
    MyDialog mdialog;
    mdialog.setModal(true);
    mdialog.exec();

    if (!mdialog.isActiveWindow())
    {
        search();
    }
}
开发者ID:soumitradc,项目名称:140110086_274,代码行数:11,代码来源:remind.cpp

示例7: WXUNUSED

void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
{
#if ( defined(__WXPM__) || defined(__WXMSW__) ) && !defined(__WXUNIVERSAL__)
    MyDialog dialog;
    if (dialog.LoadNativeDialog(this, _T("dialog1")))
    {
        dialog.ShowModal();
    }
#else
    wxMessageBox(_T("No native dialog support"),_T("Platform limitation"));
#endif
}
开发者ID:EdgarTx,项目名称:wx,代码行数:12,代码来源:nativdlg.cpp

示例8: main

int main(int argc, char **argv)
{
    QApplication app(argc, argv);

    MyObject obj;
    MyDialog dialog;

    dialog.connect(dialog.aButton, SIGNAL(clicked()), SLOT(close()));
    dialog.show();

    return app.exec();
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:12,代码来源:main.cpp

示例9: main

int main(int argc, char* argv[]) {
    QApplication app(argc, argv);

    MyDialog* dialog = new MyDialog;
    //MyDialog dialog;

    QObject::connect(dialog, SIGNAL(onKeywordMatched(const QString&)),
                     &app, SLOT(quit()));

    dialog->show();

    return app.exec();
}
开发者ID:heejune,项目名称:beginning-qt-boost,代码行数:13,代码来源:main.cpp

示例10: close

// 重新登录按钮
void MyWidget::on_pushButton_clicked()
{
    // 先关闭主界面,其实是隐藏起来了,并没有真正退出
    close();

    // 新建MyDialog对象
    MyDialog dlg;

    // 如果按下了“进入主窗口”按钮,则再次显示主界面
    // 否则,因为现在已经没有显示的界面了,所以程序将退出
    if(dlg.exec()== QDialog::Accepted) show();

}
开发者ID:github-jxm,项目名称:QtCrearor_fast_learn,代码行数:14,代码来源:mywidget.cpp

示例11: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
    QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));       //支持Tr中文
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));//支持中文文件名显示
    QFont font;
    font.setStyleStrategy(QFont::PreferDefault);
    //font.setPointSize(160);//实际上是16的字号,但设成16却不行
    //font.setFamily(("wenquanyi"));
    //font.setBold(false);
    a.setFont(font);

    MyDialog *w = new MyDialog;
    //w->showMaximized();//最大化显示
    w->setWindowTitle("GPS评估程序");
    w->show();
    return a.exec();
}
开发者ID:chenyanming,项目名称:GPS,代码行数:20,代码来源:main.cpp

示例12: main

int main() {
   ALLEGRO_DISPLAY     *display;
   ALLEGRO_TIMER       *tick_timer;

   if (!al_init()) {
      TRACE("Allegro init failed!\n");
      return 1;
   }

   al_init_font_addon();
   al_init_image_addon();
   al_init_primitives_addon();
   al_install_keyboard();
   al_install_mouse();

   display = al_create_display(640, 480);
   if (!display) {
      TRACE("Display init failed!\n");
      return 1;
   }

   al_hide_mouse_cursor(display);

   /* Must set this before calling InstallMASkinG() ! */
   MAS::SetLogicRate(1.0 / 0.02);

   /* MASkinG must be initialized after the display. */
   if (InstallMASkinG("allegro.cfg") != MAS::Error::NONE ) {
      TRACE("MA5kinG init failed!\n");
      return 1;
   }

   tick_timer = al_create_timer(0.02);

   queue = al_create_event_queue();
   al_register_event_source(queue, (ALLEGRO_EVENT_SOURCE *) al_get_keyboard_event_source());
   al_register_event_source(queue, (ALLEGRO_EVENT_SOURCE *) al_get_mouse_event_source());
   al_register_event_source(queue, (ALLEGRO_EVENT_SOURCE *) display);
   al_register_event_source(queue, (ALLEGRO_EVENT_SOURCE *) tick_timer);

   // create a new dialog on the current display
   MyDialog *dlg = new MyDialog();

   al_start_timer(tick_timer);

   /* You have to call this manually. */
   dlg->Start();

   while (!dlg->ShouldClose()) {
      ALLEGRO_EVENT event;
      al_wait_for_event(queue, &event);

      switch (event.type) {
         case ALLEGRO_EVENT_TIMER:
            if (event.timer.source == tick_timer) {
               dlg->DoTick();

               /* Skip the drawing if we've got more events to process. */
               if (!al_event_queue_is_empty(queue))
                  continue;

               /* Redraw the screen */
               al_clear_to_color(al_map_rgb(0, 0, 0));
               dlg->Draw();
               al_flip_display();
            }
            else
               /* Oh, it must be the game timer. */
               dlg->ProcessEvent(&event);
         break;
         default:
            dlg->ProcessEvent(&event);
      }
   }

   /* You have to call this manually. */
   dlg->End();

   // delete the dialog
   delete dlg;

   ExitMASkinG();

   return 0;
}
开发者ID:bambams,项目名称:ma5king,代码行数:85,代码来源:ex05.cpp

示例13: MyGui

 MyGui() : m_layout(this), m_button("Show Dialog"), m_dialog(this) {
    m_button.setObjectName("button");
    m_dialog.setObjectName("dialog");
    m_layout.addWidget(&m_label);
    m_layout.addWidget(&m_button);
    QMetaObject::connectSlotsByName(this);
 }
开发者ID:KubaO,项目名称:stackoverflown,代码行数:7,代码来源:main.cpp

示例14: on_button_clicked

 Q_SLOT void on_button_clicked() {
    m_dialog.show();
 }
开发者ID:KubaO,项目名称:stackoverflown,代码行数:3,代码来源:main.cpp


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