]> rtime.felk.cvut.cz Git - orte.git/blob - orte/contrib/shape/MainFrm.ui.h
971360dfd6645c2176b19a88855bc2412213ac9c
[orte.git] / orte / contrib / shape / MainFrm.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 slots use Qt Designer which will
5 ** update this file, preserving your code. Create an init() slot in place of
6 ** a constructor, and a destroy() slot in place of a destructor.
7 *****************************************************************************/
8 #include <qstring.h>
9 #include <stdio.h>
10 #include <stdlib.h>
11
12 void MainForm::init()
13 {
14         m_wantClose=0;
15         m_close=0;
16     }
17
18 void MainForm::resizeEvent( QResizeEvent *)
19 {
20         View->setGeometry(0,15,size().width(),size().height()-15);
21 }
22
23 void MainForm::SetShapeRect(QRect rect)
24 {
25         m_shapeRect=rect;
26         View->SetShapeRect(m_shapeRect);
27 }
28
29 void MainForm::SetProperties(char shape, char color)
30 {
31         View->SetShape(shape);
32         View->SetShapeColor(color);
33 }
34
35 int MainForm::MaxX()
36 {
37         return View->width();
38 }
39
40 int MainForm::MaxY()
41 {
42         return View->height();
43 }
44
45
46 void MainForm::closeEvent( QCloseEvent * e )
47 {
48         if(m_wantClose==1) e->accept();
49         else {
50             e->ignore();
51             m_close=1;
52         }
53 }
54
55
56 void MainForm::WantClose()
57 {
58         m_wantClose=1;
59 }
60
61 int MainForm::getClose()
62 {
63  return m_close;
64 }