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


C++ TestWindow::Show方法代码示例

本文整理汇总了C++中TestWindow::Show方法的典型用法代码示例。如果您正苦于以下问题:C++ TestWindow::Show方法的具体用法?C++ TestWindow::Show怎么用?C++ TestWindow::Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestWindow的用法示例。


在下文中一共展示了TestWindow::Show方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: app

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

示例3:

static void
Main()
{
  TestWindow window;
  window.Create({250, 250});
  window.Show();

  window.RunEventLoop();
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:9,代码来源:RunCanvas.cpp

示例4: 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

示例5: onClick

/*
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

示例6: watch

TestApplication::TestApplication()
	: BApplication("application/x-vnd.ARP-layoutest")
{
	TestWindow		*aWindow;

	// Instantiate the test window, and make it visible.	
	aWindow = new TestWindow(this);
	aWindow->Show();
	
	fflush(stdout);
	fflush(stderr);
	
	{
		DB(DBALL,cdb << "Testing messages..." << endl);
		BMessage testMsg;
		status_t res = testMsg.AddInt32("A param...",65);
		DB(DBALL,cdb << "Added an int32; result=" << res << endl);
		res = testMsg.AddFloat("A param...",103.4);
		DB(DBALL,cdb << "Added a float; result=" << res << endl);
		DB(DBALL,cdb << "Final message = " << testMsg << endl);
		DB(DBALL,cdb.flush());
	}
	
	{
		BStopWatch watch("FuncCall StopWatch");
		watch.Reset();
	
		printf("Testing virtual function calls...\n");
		int64 i;
		watch.Resume();
		const int fcount = 10000000;
		for( i=0; i<fcount; i++ ) {
			aWindow->TestFunc("a string",23);
		}
		watch.Suspend();
	
		bigtime_t el = watch.ElapsedTime();
		printf("Operations per second: %f\n",
			(((float)fcount)*1000000.0)/(float)el);
	}

	{
		BStopWatch watch("BMessage StopWatch");
		watch.Reset();
	
		printf("Testing BMessage invocation...\n");
		int64 i;
		watch.Resume();
		const int fcount = 10000000;
		for( i=0; i<fcount; i++ ) {
			BMessage testMsg;
			aWindow->TestMsg(testMsg);
		}
		watch.Suspend();
	
		bigtime_t el = watch.ElapsedTime();
		printf("Operations per second: %f\n",
			(((float)fcount)*1000000.0)/(float)el);
	}

	{
		BStopWatch watch("BMessage init StopWatch");
		watch.Reset();
	
		printf("Testing BMessage initialization...\n");
		int64 i;
		watch.Resume();
		const int fcount = 10000;
		for( i=0; i<fcount; i++ ) {
			BMessage testMsg;
			testMsg.AddInt32("A param...",65);
			aWindow->TestMsg(testMsg);
		}
		watch.Suspend();
	
		bigtime_t el = watch.ElapsedTime();
		printf("Operations per second: %f\n",
			(((float)fcount)*1000000.0)/(float)el);
	}
}
开发者ID:HaikuArchives,项目名称:Sequitur,代码行数:80,代码来源:Profile.cpp


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