本文整理汇总了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;
};
示例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;
}
示例3:
static void
Main()
{
TestWindow window;
window.Create({250, 250});
window.Show();
window.RunEventLoop();
}
示例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
}
}
示例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;
}
示例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);
}
}