// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// Extensively rewritten and refactored by James L. Hammons
// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// Extensively rewritten and refactored by James L. Hammons
statusBar()->showMessage(tr("Running script '%1'").arg(name), 2000);
QStringList scriptList = RS_SYSTEM->getScriptList();
statusBar()->showMessage(tr("Running script '%1'").arg(name), 2000);
QStringList scriptList = RS_SYSTEM->getScriptList();
// zoomToolBar = new Q3ToolBar(this, "Zoom Operations");
zoomToolBar = addToolBar(tr("Zoom Operations"));
zoomToolBar->setObjectName("zoom");
// zoomToolBar = new Q3ToolBar(this, "Zoom Operations");
zoomToolBar = addToolBar(tr("Zoom Operations"));
zoomToolBar->setObjectName("zoom");
penToolBar->setObjectName("pen");
connect(penToolBar, SIGNAL(penChanged(RS_Pen)), this, SLOT(slotPenChanged(RS_Pen)));
penToolBar->setObjectName("pen");
connect(penToolBar, SIGNAL(penChanged(RS_Pen)), this, SLOT(slotPenChanged(RS_Pen)));
// dw = new QDockWidget(QDockWidget::InDock, this, "Layer");
dw = new QDockWidget(tr("Layer List"), this);
dw->setObjectName("layer");
// dw = new QDockWidget(QDockWidget::InDock, this, "Layer");
dw = new QDockWidget(tr("Layer List"), this);
dw->setObjectName("layer");
layerWidget->setFocusPolicy(Qt::NoFocus);
connect(layerWidget, SIGNAL(escape()), this, SLOT(slotFocus()));
connect(this, SIGNAL(windowsChanged(bool)), layerWidget, SLOT(setEnabled(bool)));
layerWidget->setFocusPolicy(Qt::NoFocus);
connect(layerWidget, SIGNAL(escape()), this, SLOT(slotFocus()));
connect(this, SIGNAL(windowsChanged(bool)), layerWidget, SLOT(setEnabled(bool)));
// dw = new QDockWidget(QDockWidget::InDock, this, "Block");
dw = new QDockWidget(tr("Block List"), this);
dw->setObjectName("block");
// dw = new QDockWidget(QDockWidget::InDock, this, "Block");
dw = new QDockWidget(tr("Block List"), this);
dw->setObjectName("block");
blockWidget->setFocusPolicy(Qt::NoFocus);
connect(blockWidget, SIGNAL(escape()), this, SLOT(slotFocus()));
connect(this, SIGNAL(windowsChanged(bool)), blockWidget, SLOT(setEnabled(bool)));
blockWidget->setFocusPolicy(Qt::NoFocus);
connect(blockWidget, SIGNAL(escape()), this, SLOT(slotFocus()));
connect(this, SIGNAL(windowsChanged(bool)), blockWidget, SLOT(setEnabled(bool)));
// dw->setCaption(tr("Library Browser"));
//not sure how to fix this one
#warning "QMainWindow::addDockWidget: invalid 'area' argument"
// dw->setCaption(tr("Library Browser"));
//not sure how to fix this one
#warning "QMainWindow::addDockWidget: invalid 'area' argument"
- addDockWidget(Qt::NoDockWidgetArea, dw);
+// addDockWidget(Qt::NoDockWidgetArea, dw);
+//This works, but sux
+ addDockWidget(Qt::RightDockWidgetArea, dw);
RS_DEBUG->print(" command widget..");
// dw = new QDockWidget(QDockWidget::InDock, this, "Command");
RS_DEBUG->print(" command widget..");
// dw = new QDockWidget(QDockWidget::InDock, this, "Command");
//which means the subwindow is NOT being activated!!!
MDIWindow * m = getMDIWindow();
RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m=%08X", m);
//which means the subwindow is NOT being activated!!!
MDIWindow * m = getMDIWindow();
RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m=%08X", m);
if (m)
RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m->getDoc=%08X", m->getDocument());
if (m)
RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m->getDoc=%08X", m->getDocument());
{
emit(gridChanged(m->getGraphic()->isGridOn()));
emit(printPreviewChanged(m->getGraphicView()->isPrintPreview()));
{
emit(gridChanged(m->getGraphic()->isGridOn()));
emit(printPreviewChanged(m->getGraphicView()->isPrintPreview()));
RS_DEBUG->print("ApplicationWindow::slotFileOpen() 001");
RS2::FormatType type = RS2::FormatUnknown;
RS_DEBUG->print("ApplicationWindow::slotFileOpen() 002");
RS_DEBUG->print("ApplicationWindow::slotFileOpen() 001");
RS2::FormatType type = RS2::FormatUnknown;
RS_DEBUG->print("ApplicationWindow::slotFileOpen() 002");
RS_DEBUG->print("ApplicationWindow::slotFileOpen() 003");
slotFileOpen(fileName, type);
RS_DEBUG->print("ApplicationWindow::slotFileOpen(): OK");
RS_DEBUG->print("ApplicationWindow::slotFileOpen() 003");
slotFileOpen(fileName, type);
RS_DEBUG->print("ApplicationWindow::slotFileOpen(): OK");
void ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType type)
{
RS_DEBUG->print("ApplicationWindow::slotFileOpen(..)");
void ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType type)
{
RS_DEBUG->print("ApplicationWindow::slotFileOpen(..)");
RS_DEBUG->print("ApplicationWindow::slotFileOpen: creating new doc window");
// Create new document window:
MDIWindow * w = slotFileNew();
RS_DEBUG->print("ApplicationWindow::slotFileOpen: creating new doc window");
// Create new document window:
MDIWindow * w = slotFileNew();
RS_DEBUG->print("ApplicationWindow::slotFileOpen: linking layer list");
// link the layer widget to the new document:
layerWidget->setLayerList(w->getDocument()->getLayerList(), false);
RS_DEBUG->print("ApplicationWindow::slotFileOpen: linking layer list");
// link the layer widget to the new document:
layerWidget->setLayerList(w->getDocument()->getLayerList(), false);
// link the layer widget to the new document:
simulationControls->setGraphicView(w->getGraphicView());
#endif
// link the layer widget to the new document:
simulationControls->setGraphicView(w->getGraphicView());
#endif
-// RS_APP->processEvents(1000);
-//We no longer try to do Qt better than the Qt folks...
-// RS_APP->processEvents(QEventLoop::AllEvents, 1000);
-
- // open the file in the new view:
- if (w->slotFileOpen(fileName, type) == false)
+ // Open the file in the new view:
+ if (!w->slotFileOpen(fileName, type))
recentFiles->add(fileName);
RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: 2");
recentFiles->add(fileName);
RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: 2");
RS_DEBUG->print("ApplicationWindow::slotFileOpen: update coordinate widget");
// update coordinate widget format:
RS_DIALOGFACTORY->updateCoordinateWidget(Vector(0.0, 0.0), Vector(0.0, 0.0), true);
RS_DEBUG->print("ApplicationWindow::slotFileOpen: update coordinate widget: OK");
RS_DEBUG->print("ApplicationWindow::slotFileOpen: update coordinate widget");
// update coordinate widget format:
RS_DIALOGFACTORY->updateCoordinateWidget(Vector(0.0, 0.0), Vector(0.0, 0.0), true);
RS_DEBUG->print("ApplicationWindow::slotFileOpen: update coordinate widget: OK");
QString message = tr("Loaded document: ") + fileName;
commandWidget->appendHistory(message);
statusBar()->showMessage(message, 2000);
QString message = tr("Loaded document: ") + fileName;
commandWidget->appendHistory(message);
statusBar()->showMessage(message, 2000);
// read default settings:
settings.beginGroup("Paths");
QString defDir = settings.value("ExportImage", RS_SYSTEM->getHomeDir()).toString();
// read default settings:
settings.beginGroup("Paths");
QString defDir = settings.value("ExportImage", RS_SYSTEM->getHomeDir()).toString();
// printer setup:
// if (printer->setup(this))
QPrintDialog dialog(printer, this);
// printer setup:
// if (printer->setup(this))
QPrintDialog dialog(printer, this);
// Link the layer list to the pen tool bar
graphic->addLayerListListener(penToolBar);
// Link the layer list to the layer widget
graphic->addLayerListListener(layerWidget);
// Link the block list to the block widget
graphic->addBlockListListener(blockWidget);
// Link the layer list to the pen tool bar
graphic->addLayerListListener(penToolBar);
// Link the layer list to the layer widget
graphic->addLayerListListener(layerWidget);
// Link the block list to the block widget
graphic->addBlockListListener(blockWidget);
modulesString = modules.join(", ");
else
modulesString = tr("None");
modulesString = modules.join(", ");
else
modulesString = tr("None");
tr("Version: %1").arg("1.0.0") + "<br>" +
tr("Date: %1").arg(__DATE__) + "<br>" +
QString("© 2010 Underground Software,<br>James Hammons") +
tr("Version: %1").arg("1.0.0") + "<br>" +
tr("Date: %1").arg(__DATE__) + "<br>" +
QString("© 2010 Underground Software,<br>James Hammons") +