summaryrefslogtreecommitdiff
path: root/modules/CIAO/examples/Display/NavDisplayGUI_exec/Worker.cpp
blob: 4257dd69f463dc3316f0a7d52e0f9bcc62d45e1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// $Id$

#include "Worker.h"
#include <qapplication.h>
#include <qmotifstyle.h>
#include <qcdestyle.h>
#include <qwindowsstyle.h>
#include <qplatinumstyle.h>
#include <qsgistyle.h>


int
Worker::svc (void)
{
  ACE_DEBUG((LM_DEBUG, "ENTER: Worker::svc()\n"));

  QApplication a(argc_, argv_);
  a.setStyle(new QPlatinumStyle);
  QCanvas canvas(600, 387);
  //QCanvas canvas(566, 679);
  //QCanvas canvas(550, 723);
  canvas.setAdvancePeriod(30);
  RootPanel root_panel(canvas);
  root_panel.resize(root_panel.sizeHint());

  root_panel.resize(600, 650);
  root_panel.setCaption("NavDisplay");

  a.setMainWidget(&root_panel);

  QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );

  if(QApplication::desktop()->width() > 550
    && QApplication::desktop()->height() > 366)
    root_panel.show();
  else
    root_panel.showMaximized();

  main_wnd_ = &root_panel;
  init_complete_.signal();

  int retval = a.exec();

  main_wnd_ = NULL;

  ACE_DEBUG((LM_DEBUG, "LEAVE: Worker::svc()\n"));
  return retval;
}