Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

MyMainWidget Class Reference

Widget for KDE frontend. More...

#include <mainWidget.h>

Inherits QWidget.

List of all members.

Public Methods

 MyMainWidget (const char *name = 0)
 MyMainWidget (const char *name = "3Dsia server")

Public Slots

void quitProg ()
void showJoystick (const char* str)

Private Attributes

QMenuBar* menuBar
QPopupMenu* fileMenu
QComboBox* chooseDevice
JoystickWidget* Joy
KMenuBar* menuBar
KPopupMenu* fileMenu


Detailed Description

Widget for KDE frontend.

Definition at line 17 of file client/frontends/qt/mainWidget.h.

00017 {
00018   Q_OBJECT
00019   public:
00020     MyMainWidget (const char *name = 0);
00021     
00022   public slots:
00023     void quitProg ();
00024     void showJoystick (const char* str);
00025 
00026   private:
00027     QMenuBar*           menuBar;
00028     QPopupMenu*         fileMenu;
00029     QComboBox*      chooseDevice;
00030     JoystickWidget* Joy;
00031 }

Constructor & Destructor Documentation

MyMainWidget::MyMainWidget ( const char * name = 0)

Definition at line 26 of file client/frontends/qt/mainWidget.cpp.

00026 {
00027     setFixedSize ( 400, 300 );
00028 
00029     fileMenu = new QPopupMenu (NULL, "File operations");
00030     CHECK_PTR (fileMenu);
00031     fileMenu->insertItem ("Exit", this, SLOT (quitProg()));
00032     
00033     menuBar = new QMenuBar (this);
00034     CHECK_PTR (menuBar);
00035     menuBar->insertItem ("File", fileMenu);
00036     
00037     QLabel* tmpLabel;
00038     tmpLabel = new QLabel (this);
00039     CHECK_PTR (tmpLabel);
00040     tmpLabel->setText ("Default input device");
00041     tmpLabel->setGeometry (5, 30, 150, 50);
00042     tmpLabel->setFrameStyle (QFrame::WinPanel | QFrame::Sunken);
00043     tmpLabel->setAlignment (AlignHCenter | AlignTop);
00044     
00045     Joy = new JoystickWidget (this);
00046     CHECK_PTR (Joy);
00047     Joy->setGeometry (160, 30, 235, 200);
00048     Joy->setFrameStyle (QFrame::WinPanel | QFrame::Sunken);
00049     Joy->hide ();
00050     
00051     chooseDevice = new QComboBox (tmpLabel);
00052     CHECK_PTR (chooseDevice);
00053     chooseDevice->insertItem ("<none>");
00054     chooseDevice->insertItem ("Joystick");
00055     chooseDevice->setGeometry (2, 23, 146, 25);
00056     chooseDevice->setStyle (WindowsStyle);
00057 
00058     connect (chooseDevice, SIGNAL (activated (const char*)), this, SLOT (showJoystick (const char*)));
00059 }

MyMainWidget::MyMainWidget ( const char * name = "3Dsia server")

Definition at line 26 of file client/frontends/qt/mainWidget.cpp.

00026 {
00027     setFixedSize ( 400, 300 );
00028 
00029     fileMenu = new QPopupMenu (NULL, "File operations");
00030     CHECK_PTR (fileMenu);
00031     fileMenu->insertItem ("Exit", this, SLOT (quitProg()));
00032     
00033     menuBar = new QMenuBar (this);
00034     CHECK_PTR (menuBar);
00035     menuBar->insertItem ("File", fileMenu);
00036     
00037     QLabel* tmpLabel;
00038     tmpLabel = new QLabel (this);
00039     CHECK_PTR (tmpLabel);
00040     tmpLabel->setText ("Default input device");
00041     tmpLabel->setGeometry (5, 30, 150, 50);
00042     tmpLabel->setFrameStyle (QFrame::WinPanel | QFrame::Sunken);
00043     tmpLabel->setAlignment (AlignHCenter | AlignTop);
00044     
00045     Joy = new JoystickWidget (this);
00046     CHECK_PTR (Joy);
00047     Joy->setGeometry (160, 30, 235, 200);
00048     Joy->setFrameStyle (QFrame::WinPanel | QFrame::Sunken);
00049     Joy->hide ();
00050     
00051     chooseDevice = new QComboBox (tmpLabel);
00052     CHECK_PTR (chooseDevice);
00053     chooseDevice->insertItem ("<none>");
00054     chooseDevice->insertItem ("Joystick");
00055     chooseDevice->setGeometry (2, 23, 146, 25);
00056     chooseDevice->setStyle (WindowsStyle);
00057 
00058     connect (chooseDevice, SIGNAL (activated (const char*)), this, SLOT (showJoystick (const char*)));
00059 }

Member Function Documentation

void MyMainWidget::quitProg () [slot]

Definition at line 72 of file client/frontends/qt/mainWidget.cpp.

00072 {
00073     printf ("Configuration complete, please run again\n");
00074     exit ( 0 );
00075 }

void MyMainWidget::showJoystick ( const char * str) [slot]

Definition at line 77 of file client/frontends/qt/mainWidget.cpp.

00077 {
00078     if (strcmp (str, "Joystick") == 0) {
00079     Joy->show ();
00080     } else {
00081     Joy->hide ();
00082     };
00083 }

Member Data Documentation

JoystickWidget * MyMainWidget::Joy [private]

Definition at line 30 of file client/frontends/qt/mainWidget.h.

QComboBox * MyMainWidget::chooseDevice [private]

Definition at line 29 of file client/frontends/qt/mainWidget.h.

KPopupMenu * MyMainWidget::fileMenu [private]

Definition at line 21 of file server/frontends/kde/mainWidget.h.

KPopupMenu * MyMainWidget::fileMenu [private]

Definition at line 28 of file client/frontends/qt/mainWidget.h.

KMenuBar * MyMainWidget::menuBar [private]

Definition at line 20 of file server/frontends/kde/mainWidget.h.

KMenuBar * MyMainWidget::menuBar [private]

Definition at line 27 of file client/frontends/qt/mainWidget.h.


The documentation for this class was generated from the following files:
Generated at Sat May 13 13:50:25 2000 for 3Dsia by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000