本文整理汇总了C++中TestWindow类的典型用法代码示例。如果您正苦于以下问题:C++ TestWindow类的具体用法?C++ TestWindow怎么用?C++ TestWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
int WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
int argc = 0;
char argv = '0';
//set up the application
GtApplication::GtApplicationInit(argc,&argv);
GtApplication* ptrApp = GtApplication::GetAppInstancePtr();
//set up the event win handle and start the event loop
if(ptrApp)
{
//set up the main window
TestWindow objMain;
objMain.Show();
ptrApp->Set_winID(objMain.Get_winID());
ptrApp->Set_ptrWindow(&objMain);
ptrApp->Execute();
}
try
{
GtApplication::Quit();
exit(0);
}catch(...){};
return 0;
};
示例2: WinMain
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;
}
示例3: main
int main()
{
new BC_Signals;
TestWindow window;
window.create_objects();
window.run_window();
}
示例4: WinMain
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;
}
示例5: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
TestWindow w;
w.show();
return a.exec();
}
示例6: Main
static void
Main()
{
TestWindow window;
window.Create({250, 250});
window.Show();
window.RunEventLoop();
}
示例7: run
void TestApp::run()
{
TestWindow *win = new TestWindow;
win->show();
COREMANAGER->setTopInputProcessor(*this);
COREMANAGER->enableResizing();
COREMANAGER->startMainLoop();
}
示例8: 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());
}
示例9: Main
static void
Main()
{
TestWindow window;
window.Create(_T("ViewImage"), {640, 480});
if (window.LoadFile(path.c_str()))
window.RunEventLoop();
else
fprintf(stderr, "Failed to load file\n");
}
示例10: 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);
}
示例11: 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);
}
示例12: BApplication
TestApplication::TestApplication()
: BApplication("application/x-vnd.ARP.LayoutTest")
{
ArpD(cdb << ADH << "LayoutTest application started, creating window." << endl);
TestWindow* tWindow = new TestWindow(this);
if( tWindow ) {
tWindow->Show();
#if 0
PrefWindow* pWindow
= new PrefWindow(BMessenger(tWindow),tWindow->Globals());
if( pWindow ) pWindow->Show();
LayoutWindow* lWindow
= new LayoutWindow();
if( lWindow ) lWindow->Show();
#endif
}
}
示例13: main
int
main(int argc, char** argv)
{
BApplication app(kAppSignature);
TestWindow* window = new TestWindow();
window->AddTest(new Test("Simple clipping",
new Test1Clipping(), new Test1Validate()));
window->AddTest(new Test("Scaled clipping 1",
new Test2Clipping(), new Test2Validate()));
window->AddTest(new Test("Scaled clipping 2",
new Test3Clipping(), new Test3Validate()));
window->AddTest(new Test("Nested states",
new Test4Clipping(), new Test4Validate()));
window->SetToTest(3);
window->Show();
app.Run();
return 0;
}
示例14: 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);
}
示例15: 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();
}