X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmainapp%2Fapplicationwindow.cpp;h=6a3fa71df35331dcba076281b1c42de222473744;hb=43c13b052d069ba435277d93867380d00c04931f;hp=45c96aaa9ea126730e9b774d3828152b31f98951;hpb=a18a12fc3bcb18e5c7ca5494d7f97fb8b93f90a2;p=architektonas diff --git a/src/mainapp/applicationwindow.cpp b/src/mainapp/applicationwindow.cpp index 45c96aa..6a3fa71 100644 --- a/src/mainapp/applicationwindow.cpp +++ b/src/mainapp/applicationwindow.cpp @@ -66,14 +66,6 @@ #include "mdiwindow.h" ApplicationWindow * ApplicationWindow::appWindow = NULL; - -#ifndef QC_APP_ICON -# define QC_APP_ICON "qcad.png" -#endif -#ifndef QC_APP_ICON16 -# define QC_APP_ICON16 "qcad16.png" -#endif - extern QSplashScreen * splash; /** @@ -89,7 +81,7 @@ ApplicationWindow::ApplicationWindow(): #warning "!!! Need to create new application icon !!!" DEBUG->print("ApplicationWindow::ApplicationWindow: setting icon"); - setWindowIcon(QIcon(":/res/" QC_APP_ICON)); + setWindowIcon(QIcon(":/res/qcad.png")); CreateQtActions(this); DEBUG->print("ApplicationWindow::ApplicationWindow: creating action handler"); @@ -1053,7 +1045,7 @@ void ApplicationWindow::initActions() // Help menu: // - helpAboutApp = new QAction(QIcon(QC_APP_ICON16), tr("&About Architektonas"), this); + helpAboutApp = new QAction(QIcon("qcad16.png"), tr("&About Architektonas"), this); // helpAboutApp = new QAction(tr("About"), qPixmapFromMimeSource(QC_APP_ICON16), tr("&About %1").arg(QC_APPNAME), 0, this); helpAboutApp->setStatusTip(tr("About the application")); //helpAboutApp->setWhatsThis(tr("About\n\nAbout the application")); @@ -1476,6 +1468,7 @@ void ApplicationWindow::slotWindowActivated(QMdiSubWindow * sw) //which means the subwindow is NOT being activated!!! // MDIWindow * m = getMDIWindow(); MDIWindow * m = (MDIWindow *)sw; +// MDIWindow * m = (MDIWindow *)(sw->widget()); DEBUG->print(/*Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m=%08X", m); DEBUG->print(/*Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m->getDoc=%08X", (m ? m->getDocument() : 0)); @@ -1539,6 +1532,8 @@ printf("slotWindowActivated(QMdiSubWindow *): currentWindow=%08X...\n", (uint)wo // Disable/Enable menu and toolbar items //This is odd... why do this when you can just call the function directly? It's //IN this class after all... +//In this case it makes a little sense, as the signal is connected to all the actions' +//setEnabled() function calls. emit(windowsChanged(m != NULL && m->getDocument() != NULL)); DEBUG->print("ApplicationWindow::slotWindowActivated end"); @@ -1830,6 +1825,11 @@ printf("MDIWindow=%08X, QMdiSubWindow=%08X\n", (uint)w, (uint)sw); //w->setFocus(); //w->activateWindow(); //w->raise(); +//will wok? +/*printf("FileNew: Setting active subwindow... (w=%08X)\n", (uint)w); +workspace->setActiveSubWindow(w); +printf("FileNew: Workspace active window = %08X\n", (uint)(workspace->activeSubWindow())); +//*/ //not anymore... #warning "!!! Parameter to slotWindowActivated() is ignored !!!" //Hm, this should be called when the window is actually activated by the QMdiArea... @@ -2252,6 +2252,7 @@ bool ApplicationWindow::slotFileExport(const QString & name, const QString & for ret = true; } #else +//#warning "ApplicationWindow::slotFileExport(): Need to port to Qt4... !!! FIX !!!" // QImage image = buffer->toImage(); // QImageWriter writer; // writer.setFileName(name);