本文整理汇总了C++中TestWindow::show方法的典型用法代码示例。如果您正苦于以下问题:C++ TestWindow::show方法的具体用法?C++ TestWindow::show怎么用?C++ TestWindow::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestWindow
的用法示例。
在下文中一共展示了TestWindow::show方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitSineTable
int WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
#endif
{
InitSineTable();
LoadFiles();
#ifdef WIN32
CommonInterface::hInst = hInstance;
TestWindow::register_class(hInstance);
MapWindow::register_class(hInstance);
#endif
#ifndef WIN32
HINSTANCE hInstance = NULL;
#endif
MapGfx.Initialise(hInstance, blackboard.SettingsMap());
TestWindow window;
GenerateBlackboard(window.map);
window.set(0, 0, 640, 480);
DrawThread::Draw(window.map);
window.show();
window.event_loop(0);
return 0;
}
示例2:
int WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
#ifdef _WIN32_WCE
LPWSTR lpCmdLine,
#else
LPSTR lpCmdLine2,
#endif
int nCmdShow)
#endif
{
ScreenGlobalInit screen_init;
#ifdef WIN32
PaintWindow::register_class(hInstance);
TestWindow::register_class(hInstance);
#endif
TestWindow window;
window.set(0, 0, 240, 100);
window.show();
window.event_loop();
return 0;
}
示例3: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
TestWindow w;
w.show();
return a.exec();
}
示例4: run
void TestApp::run()
{
TestWindow *win = new TestWindow;
win->show();
COREMANAGER->setTopInputProcessor(*this);
COREMANAGER->enableResizing();
COREMANAGER->startMainLoop();
}
示例5: testInit
void SlideContainerAutoTest::testInit()
{
// Even with content, a SlideContainer should be invisible until slideIn()
// is called
TestWindow window;
window.show();
QTest::qWait(500);
QCOMPARE(window.mMainWidget->height(), window.height());
}
示例6: testHiddenContentResize
void SlideContainerAutoTest::testHiddenContentResize()
{
// Resizing content should not trigger a slide if it is not visible.
TestWindow window;
window.show();
QTest::qWaitForWindowShown(&window);
window.mContent->show();
window.mContent->setFixedSize(150, 80);
QTest::qWait(500);
QCOMPARE(window.mContainer->height(), 0);
}
示例7: testSlideIn
void SlideContainerAutoTest::testSlideIn()
{
TestWindow window;
QSignalSpy inSpy(window.mContainer, SIGNAL(slidedIn()));
QSignalSpy outSpy(window.mContainer, SIGNAL(slidedOut()));
window.show();
window.mContainer->slideIn();
while (window.mContainer->slideHeight() != window.mContent->height()) {
QTest::qWait(100);
}
QCOMPARE(window.mContainer->height(), window.mContent->height());
QCOMPARE(inSpy.count(), 1);
QCOMPARE(outSpy.count(), 0);
}
示例8: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
TestWindow* window = new TestWindow;
window->resize(1700, 1200);
QHBoxLayout *layout = new QHBoxLayout;
window->setLayout(layout);
Open3DGraphicsAdventureEngine* engine = new Open3DGraphicsAdventureEngine(window);
layout->addWidget(engine->getRenderWidget());
window->show();
return a.exec();
}
示例9: testSlideInDeleteSlideOut
void SlideContainerAutoTest::testSlideInDeleteSlideOut()
{
// If content is deleted while visible, slideOut() should still produce an
// animation
TestWindow window;
window.show();
window.mContainer->slideIn();
while (window.mContainer->slideHeight() != window.mContent->height()) {
QTest::qWait(100);
}
window.mContent->deleteLater();
window.mContainer->slideOut();
while (window.mContainer->slideHeight() != 0) {
QTest::qWait(100);
}
QCOMPARE(window.mContainer->height(), 0);
}
示例10: main
int main(int argc, char **argv)
{
int result = ERROR_OK;
KAboutData about("kross",
0,
ki18n("Kross"),
"0.1",
ki18n("KDE application to run Kross scripts."),
KAboutData::License_LGPL,
ki18n("(C) 2006 Sebastian Sauer"),
ki18n("Run Kross scripts."),
"http://kross.dipe.org",
"[email protected]");
about.addAuthor(ki18n("Sebastian Sauer"), ki18n("Author"), "[email protected]");
// Initialize command line args
KCmdLineArgs::init(argc, argv, &about);
// Tell which options are supported and parse them.
KCmdLineOptions options;
options.add("+file", ki18n("Scriptfile"));
KCmdLineArgs::addCmdLineOptions(options);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
// If no options are defined.
if(args->count() < 1) {
std::cout << "Syntax: " << KCmdLineArgs::appName().toLocal8Bit().constData() << " scriptfile1 [scriptfile2] [scriptfile3] ..." << std::endl;
return ERROR_HELP;
}
// Each argument is a scriptfile to open
QStringList scripts;
for(int i = 0; i < args->count(); i++)
scripts.append( args->arg(i) );
app = new KApplication(true);
TestWindow *mainWin = new TestWindow(scripts);
mainWin->show();
args->clear();
result = app->exec();
delete app;
return result;
}
示例11: main
int main(int argc, char **argv)
{
try
{
GuiApp app(argc, argv);
app.initSubsystems(App::DisablePlugins);
TestWindow win;
win.show();
return app.execLoop();
}
catch(Error const &err)
{
qWarning() << err.asText();
}
qDebug("Exiting main()...");
return 0;
}
示例12: main
int main( int argc, char** argv )
{
QApplication app( argc, argv );
TestWindow window;
app.setMainWidget(&window);
//app.setMainWidget( dz );
window.resize( 640, 400 );
window.show();
return app.exec();
/*
SignalTraceReader str;
str.open( "signaltrace.txt" );
str.skipLines( 4 );
SignalInfoList sil;
str.readSignalInfo( sil );
sil.dump();
*/
}
示例13: main
int main(int argc, char **argv)
{
KAboutData about("propertytest2", 0, ki18n("KoProperty Test"), version, ki18n(description),
KAboutData::License_GPL, ki18n("(C) 2005 Cedric Pasteur"), KLocalizedString(), 0, "[email protected]");
about.addAuthor(ki18n("Cedric Pasteur"), KLocalizedString(), "[email protected]");
KCmdLineArgs::init(argc, argv, &about);
KCmdLineOptions options;
options.add("flat",
ki18n("Flat display: do not display groups\n"
"(useful for testing)"));
options.add("font-size <size>",
ki18n("Set font size to <size> (in points)\n"
"(useful for testing whether editors keep the font settings)"));
options.add("property <name>",
ki18n("Display only specified property\n"
"(useful when we want to focus on testing a single\n"
"property editor)"));
options.add("ro",
ki18n("Set all properties as read-only:\n"
"(useful for testing read-only mode)"));
KCmdLineArgs::addCmdLineOptions(options);
KApplication app;
TestWindow test;
bool ok;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
const int fontSize = args->getOption("font-size").toInt(&ok);
if (fontSize > 0 && ok) {
QFont f(test.font());
f.setPointSize(fontSize);
test.setFont(f);
}
test.show();
return app.exec();
}