default constructor Definition at line 47 of file aimainwindow.cpp. 00048 :m_saveFile(),m_selectedFractalIndex(0),m_currentThreadsNumber(1),m_startedThreads(1), 00049 m_firstCompositionModeIndex(QPainter::CompositionMode_Source), m_othersCompositionModeIndex(QPainter::CompositionMode_Screen), 00050 m_viewX( .0 ), m_viewY( .0 ), m_zoom( 1. ), 00051 m_serialize( false ) 00052 { 00053 //~ init 00054 00055 //# menubar widget 00056 m_menuBar = new AiMenuBar( this ); 00057 //# toolbar widget 00058 m_toolbar = new AiToolBar(this); 00059 //# statusbar widget 00060 m_statusbar = new AiStatusBar(); 00061 //# view-area widget for displaying generated fractals and opened png files 00062 m_view = new AiViewerArea(this); 00063 //# tool-box dialog box maybe GIMP-like ;) 00064 m_config = new AiConfig(this); 00065 //#undo dialog 00066 m_undoDialog = new AiUndoDialog( m_view->view()->stack, this ); 00067 00068 //~ setup 00069 00070 //# connect menubar signals to main-thread slots 00071 //* file menu 00072 this->connect( m_menuBar, SIGNAL(fileOpen()), this, SLOT(fileOpen())); 00073 this->connect( m_menuBar, SIGNAL(fileSave()), this, SLOT(fileSave())); 00074 this->connect( m_menuBar, SIGNAL(fileSaveAs()), this, SLOT(fileSaveAs())); 00075 this->connect( m_menuBar, SIGNAL(filePrint()), this, SLOT(filePrint())); 00076 this->connect( m_menuBar, SIGNAL(fileClear()), this, SLOT(fileClear())); 00077 this->connect( m_menuBar, SIGNAL(fileQuit()), this, SLOT(fileQuit())); 00078 00079 //* zoom menu 00080 this->connect( m_menuBar, SIGNAL(zoomZoomIn()), this, SLOT(zoomZoomIn())); 00081 this->connect( m_menuBar, SIGNAL(zoomZoomOut()), this, SLOT(zoomZoomOut())); 00082 this->connect( m_menuBar, SIGNAL(zoomFitInWindow()), this, SLOT(zoomFitInWindow())); 00083 this->connect( m_menuBar, SIGNAL(zoomFitToWindow()), this, SLOT(zoomFitToWindow())); 00084 this->connect( m_menuBar, SIGNAL(zoom1600p()), this, SLOT(zoom1600p())); 00085 this->connect( m_menuBar, SIGNAL(zoom800p()), this, SLOT(zoom800p())); 00086 this->connect( m_menuBar, SIGNAL(zoom400p()), this, SLOT(zoom400p())); 00087 this->connect( m_menuBar, SIGNAL(zoom200p()), this, SLOT(zoom200p())); 00088 this->connect( m_menuBar, SIGNAL(zoom100p()), this, SLOT(zoom100p())); 00089 this->connect( m_menuBar, SIGNAL(zoom50p()), this, SLOT(zoom50p())); 00090 this->connect( m_menuBar, SIGNAL(zoom25p()), this, SLOT(zoom25p())); 00091 this->connect( m_menuBar, SIGNAL(zoom12_5p()), this, SLOT(zoom12_5p())); 00092 this->connect( m_menuBar, SIGNAL(zoom6_25p()), this, SLOT(zoom6_25p())); 00093 00094 //* image menu 00095 this->connect( m_menuBar, SIGNAL(imageHorizontalMirror()), this, SLOT(imageHorizontalMirror())); 00096 this->connect( m_menuBar, SIGNAL(imageVerticalMirror()), this, SLOT(imageVerticalMirror())); 00097 this->connect( m_menuBar, SIGNAL(imageRotation90()), this, SLOT(imageRotation90())); 00098 this->connect( m_menuBar, SIGNAL(imageRotationNigative90()), this, SLOT(imageRotationNigative90())); 00099 this->connect( m_menuBar, SIGNAL(imageRotation180()), this, SLOT(imageRotation180())); 00100 00101 //* complex zone 00102 this->connect( m_menuBar, SIGNAL(genRun()), this, SLOT(genRun())); 00103 this->connect( m_menuBar, SIGNAL(genStop()), this, SLOT(genStop())); 00104 this->connect( m_menuBar, SIGNAL(genThreadsNumbers()), this, SLOT(genThreadsNumbers())); 00105 this->connect( m_menuBar, SIGNAL(genChooseFractal()), this, SLOT(genChooseFractal())); 00106 this->connect( m_menuBar, SIGNAL(complexZone()), this, SLOT(complexZone())); 00107 this->connect( m_menuBar, SIGNAL(serialize()), this, SLOT(serialize())); 00108 this->connect( m_menuBar, SIGNAL(deserialize()), this, SLOT(deserialize())); 00109 00110 //* help 00111 this->connect( m_menuBar, SIGNAL(helpAbout()), this, SLOT(helpAbout())); 00112 this->connect( m_menuBar, SIGNAL(helpHelp()), this, SLOT(helpHelp())); 00113 00114 //* toolbar 00115 this->connect( m_toolbar, SIGNAL(toolbox(bool)),this,SLOT(showToolbox(bool))); 00116 this->connect( m_toolbar, SIGNAL(fileOpen()), this, SLOT(fileOpen())); 00117 this->connect( m_toolbar, SIGNAL(fileSave()), this, SLOT(fileSave())); 00118 this->connect( m_toolbar, SIGNAL(fileClear()), this, SLOT(fileClear())); 00119 this->connect( m_toolbar, SIGNAL(zoomIn()), this, SLOT(zoomZoomIn())); 00120 this->connect( m_toolbar, SIGNAL(zoomOut()), this, SLOT(zoomZoomOut())); 00121 this->connect( m_toolbar, SIGNAL(mirrorH()), this, SLOT(imageHorizontalMirror())); 00122 this->connect( m_toolbar, SIGNAL(mirrorV()), this, SLOT(imageVerticalMirror())); 00123 this->connect( m_toolbar, SIGNAL(complexZone()), this, SLOT(complexZone())); 00124 this->connect( m_toolbar, SIGNAL(helpAbout()), this, SLOT(helpAbout())); 00125 this->connect( m_toolbar ,SIGNAL(complexRun()),this,SLOT(runGenerator())); 00126 this->connect( m_toolbar ,SIGNAL(complexStop()),this,SLOT(stopGenerator())); 00127 this->connect( m_toolbar ,SIGNAL(undo()),this,SLOT(undo())); 00128 00129 //* configuration 00130 this->connect(m_config ,SIGNAL(closed()),this,SLOT(checkedToolbox())); 00131 this->connect(m_config ,SIGNAL(zoomIn()),this,SLOT(zoomZoomIn())); 00132 this->connect(m_config ,SIGNAL(zoomOut()),this,SLOT(zoomZoomOut())); 00133 this->connect(m_config ,SIGNAL(zoomArea(bool)),this,SLOT(toolsZoomArea(bool))); 00134 this->connect(m_config ,SIGNAL(horizontalMirror()),this,SLOT(imageHorizontalMirror())); 00135 this->connect(m_config ,SIGNAL(verticalMirror()),this,SLOT(imageVerticalMirror())); 00136 this->connect(m_config ,SIGNAL(clear()),this,SLOT(fileClear())); 00137 this->connect(m_config ,SIGNAL(rotation(int)),this,SLOT(toolsRotation(int))); 00138 this->connect(m_config ,SIGNAL(refreshItems()),this,SLOT(refreshItems())); 00139 this->connect(m_config ,SIGNAL(debugFractal()),this,SLOT(debugFractal())); 00140 this->connect(m_config ,SIGNAL(currentIndexChanged(int)),this,SLOT(currentIndexChanged(int))); 00141 this->connect(m_config ,SIGNAL(currentThreads(int)),this,SLOT(currentThreads(int))); 00142 this->connect(m_config ,SIGNAL(firstCompositionMode(int)),this,SLOT(firstCompositionMode(int))); 00143 this->connect(m_config ,SIGNAL(othersCompositionMode(int)),this,SLOT(othersCompositionMode(int))); 00144 this->connect(m_config ,SIGNAL(runGenerator()),this,SLOT(runGenerator())); 00145 this->connect(m_config ,SIGNAL(stopGenerator()),this,SLOT(stopGenerator())); 00146 00147 this->connect(m_view ,SIGNAL(zoneZooming(int,int,int,int)),this,SLOT(zoneZooming(int,int,int,int))); 00148 this->connect(m_view ,SIGNAL(enabledChilds(bool)),this,SLOT(enabledChilds(bool))); 00149 00150 this->setMenuBar( m_menuBar ); 00151 this->addToolBar( m_toolbar ); 00152 this->setStatusBar( m_statusbar ); 00153 this->setCentralWidget( m_view ); 00154 00155 00156 this->enabledChilds( false ); 00157 00158 m_config->resize(200,400); 00159 this->resize(500,400); 00160 } |