#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;
/**
#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");
// 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"));
//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));
// 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");
//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...
ret = true;
}
#else
+//#warning "ApplicationWindow::slotFileExport(): Need to port to Qt4... !!! FIX !!!"
// QImage image = buffer->toImage();
// QImageWriter writer;
// writer.setFileName(name);