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();
// 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()));
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);
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") +