]> rtime.felk.cvut.cz Git - orte.git/blob - orte/contrib/shape/MainForm.ui.h
New version of shapedemo
[orte.git] / orte / contrib / shape / MainForm.ui.h
1 /****************************************************************************
2 ** ui.h extension file, included from the uic-generated form implementation.
3 **
4 ** If you wish to add, delete or rename functions or slots use
5 ** Qt Designer which will update this file, preserving your code. Create an
6 ** init() function in place of a constructor, and a destroy() function in
7 ** place of a destructor.
8 *****************************************************************************/
9 #include <qmessagebox.h>
10 #include <qapplication.h>
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <qptrlist.h>
14 #include "FPublisher.h"
15 #include "FSubscriber.h"
16 #include "richtext.h"
17
18
19 void MainForm::addPublisher()
20 {
21
22     FPublisher *fp;
23     fp = new FPublisher(this);
24     fp->initPublisher(publGroup->id(publGroup->selected()),rand()%3);
25     fp->show();
26 }
27
28 void MainForm::addSubscriber()
29 {
30     FSubscriber *fs;
31     fs = new FSubscriber(this);
32     fs->initSubscribers(
33         clBlue->isChecked(),
34         clGreen->isChecked(),
35         clRed->isChecked(),
36         clBlack->isChecked(),
37         clYellow->isChecked());
38     fs->show();
39 }
40
41 void MainForm::about()
42 {
43     QMessageBox::about( this, "ORTE application demo",
44                         "This application demonstrates use of ORTE library\n\n"
45                         "Petr Smolik (c) 2004\n"
46                         "OCERA team");
47 }
48
49 void MainForm::viewPublSource()
50 {
51     MyRichText *richtext;
52     richtext=new MyRichText;
53     richtext->resize( 450, 350 );
54     richtext->setCaption( "Publisher example" );
55     richtext->setTextPublisher();
56     richtext->show();
57 }
58
59 void MainForm::viewSubsSource()
60 {
61     MyRichText *richtext;
62     richtext=new MyRichText;
63     richtext->resize( 450, 350 );
64     richtext->setCaption( "Subscriber example" );
65     richtext->setTextSubscriber();
66     richtext->show();
67 }
68
69 void MainForm::closeEvent( QCloseEvent *e )
70 {
71     sigClose();
72     e->accept();
73 }