本文整理汇总了C++中TestWindow类的典型用法代码示例。如果您正苦于以下问题:C++ TestWindow类的具体用法?C++ TestWindow怎么用?C++ TestWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestWindow类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
};
开发者ID:trident99,项目名称:granturismo,代码行数:28,代码来源:main15.cpp
示例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;
}
开发者ID:bugburner,项目名称:xcsoar,代码行数:32,代码来源:RunMapWindow.cpp
示例3: main
int main()
{
new BC_Signals;
TestWindow window;
window.create_objects();
window.run_window();
}
开发者ID:Cuchulain,项目名称:cinelerra,代码行数:7,代码来源:test3.C
示例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;
}
开发者ID:galippi,项目名称:xcsoar,代码行数:25,代码来源:KeyCodeDumper.cpp
示例5: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
TestWindow w;
w.show();
return a.exec();
}
开发者ID:ASGAlex,项目名称:openpsy,代码行数:8,代码来源:main.cpp
示例6: Main
static void
Main()
{
TestWindow window;
window.Create({250, 250});
window.Show();
window.RunEventLoop();
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:9,代码来源:RunCanvas.cpp
示例7: run
void TestApp::run()
{
TestWindow *win = new TestWindow;
win->show();
COREMANAGER->setTopInputProcessor(*this);
COREMANAGER->enableResizing();
COREMANAGER->startMainLoop();
}
开发者ID:jonyamo,项目名称:centerim5,代码行数:9,代码来源:colorpicker.cpp
示例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());
}
开发者ID:theunbelievablerepo,项目名称:gwenview,代码行数:10,代码来源:slidecontainerautotest.cpp
示例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");
}
开发者ID:StefanL74,项目名称:XCSoar,代码行数:10,代码来源:ViewImage.cpp
示例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);
}
开发者ID:theunbelievablerepo,项目名称:gwenview,代码行数:12,代码来源:slidecontainerautotest.cpp
示例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);
}
开发者ID:theunbelievablerepo,项目名称:gwenview,代码行数:15,代码来源:slidecontainerautotest.cpp
示例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
}
}
开发者ID:HaikuArchives,项目名称:Sequitur,代码行数:17,代码来源:LayoutTest.cpp
示例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;
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:25,代码来源:main.cpp
示例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);
}
开发者ID:theunbelievablerepo,项目名称:gwenview,代码行数:18,代码来源:slidecontainerautotest.cpp
示例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();
}
开发者ID:AlanSmithee1984,项目名称:Open3DGraphicsAdventureEngine,代码行数:18,代码来源:main.cpp
示例16: 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;
}
开发者ID:KDE,项目名称:kross-interpreters,代码行数:44,代码来源:main.cpp
示例17: main
int main()
{
BApplication app( "application/x-vnd.dleRednex-DLEScrollViewTest" );
TestWindow *win = new TestWindow;
win->Lock();
dle::VSplit *vs = new dle::VSplit;
{
dle::BMenuBar *menubar = new dle::BMenuBar( "wheee", B_ITEMS_IN_ROW );
menubar->SetInner( 0 );
vs->AddObject( menubar, 1.0f );
printf( "%f\n", menubar->GetInnerLeft() );
dle::AutoScrollView *asv = new dle::AutoScrollView;
{
dle::VSplit *vs = new dle::VSplit;
for( int i=0; i<4; i++ )
{
dle::HSplit *hs = new dle::HSplit;
for( int j=0; j<8; j++ )
{
dle::VSplit *vs = new dle::VSplit;
for( int k=0; k<4; k++ )
{
dle::BButton *bb = new dle::BButton( "HitMe!", new BMessage('hit!') );
vs->AddObject( bb, 1.0f );
}
hs->AddObject( vs, 1.0f );
}
vs->AddObject( hs, 1.0f );
}
asv->AddObject( vs );
}
vs->AddObject( asv );
}
win->AddObject( vs );
win->Unlock();
app.Run();
return 0;
}
开发者ID:HaikuArchives,项目名称:YasirsJunkyard,代码行数:43,代码来源:ScrollViewTest.cpp
示例18: 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;
}
开发者ID:cmbruns,项目名称:Doomsday-Engine,代码行数:20,代码来源:main.cpp
示例19: QSlotStorage
/*
class QSlotStorage : public QObject {
public:
QSlotStorage() { }
void onClick() {
printf("QSlotStorage::onClicked()\n");
fflush(stdout);
}
};
*/
int main() {
BApplication *app = new BApplication("application/x.vnd-Lemon-Nirvana");
TestWindow *test = new TestWindow( BRect(30,30,700,500), "test1" );
QWidget *widget = test->RootWidget();
QCheckBox *check = new QCheckBox( widget );
check->resize(100,200);
QSlotStorage *storage = new QSlotStorage();
QObject::connect(check, SIGNAL(clicked()), new QSlot(storage, SLOT(onClick())));
KWQSignal *signal = check->findSignal(SIGNAL(clicked()));
//printf("%s\n",signal->_name);
signal->call();
check->setText("Label sd fsd fsd fsd fsd fsd fsd fsd fsd fsd fsd fsd fs dfs df sd fsd fs fd");
check->move(100,100);
test->Show();
app->Run();
return 0;
}
开发者ID:BackupTheBerlios,项目名称:nirvana-svn,代码行数:30,代码来源:qdemo.cpp
示例20: main
int main(int argc, char *argv[])
{
new BC_Signals;
TestWindow window;
int angles[] = { 180, 0 };
float values[] = { 1, 0 };
window.add_tool(new BC_Pan(10,
120,
100,
1,
2,
angles,
-1,
-1,
values));
window.add_tool(new BC_TextBox(10, 10, 200, 5, _("Mary Egbert\nhad a little lamb.")));
BC_Title *title;
window.add_tool(title = new BC_Title(10, 210, _("Hello world")));
title->update("xyz");
window.show_window();
sleep(2);
title->update("abc");
window.run_window();
// thread_fork();
}
开发者ID:beequ7et,项目名称:cinelerra-cv,代码行数:29,代码来源:test.C
注:本文中的TestWindow类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论