-// qc_applicationwindow.cpp
+// applicationwindow.cpp
//
// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// Qt4's much more sensible action handling
//
-#include "qc_applicationwindow.h"
+#include "applicationwindow.h"
#include <fstream>
#include "rs_actiondrawlinefree.h"
+#include "rs_actionlibraryinsert.h"
#include "rs_actionprintpreview.h"
#include "rs_creation.h"
#include "rs_dialogfactory.h"
#include "rs_dimlinear.h"
#include "rs_dimradial.h"
#include "rs_ellipse.h"
-#include "rs_hatch.h"
-#include "rs_image.h"
#include "rs_fileio.h"
+#include "rs_hatch.h"
#include "rs_insert.h"
-#include "rs_text.h"
-#include "settings.h"
+#include "rs_image.h"
+#include "paintintf.h"
#include "rs_script.h"
#include "rs_scriptlist.h"
+#include "settings.h"
#include "rs_solid.h"
#include "rs_staticgraphicview.h"
#include "rs_system.h"
-#include "rs_actionlibraryinsert.h"
+#include "rs_text.h"
#include "rs_units.h"
-#include "paintintf.h"
#ifdef RS_CAM
#include "rs_camdialog.h"
#include "mousewidget.h"
#include "selectionwidget.h"
-#include "qc_mdiwindow.h"
+#include "mdiwindow.h"
#include "qc_dialogfactory.h"
#include "createqtactions.h"
#include "main.h"
-QC_ApplicationWindow * QC_ApplicationWindow::appWindow = NULL;
+ApplicationWindow * ApplicationWindow::appWindow = NULL;
#ifndef QC_APP_ICON
# define QC_APP_ICON "qcad.png"
/**
* Constructor. Initializes the app.
*/
-QC_ApplicationWindow::QC_ApplicationWindow():
+ApplicationWindow::ApplicationWindow():
// Q3MainWindow(0, "", Qt::WDestructiveClose), QG_MainWindowInterface()
QMainWindow((QWidget *)NULL/*,this is not a Qt::WindowFlags --> Qt::WA_DeleteOnClose*/), QG_MainWindowInterface()
{
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow");
appWindow = this;
//no assistant = NULL;
workspace = NULL;
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: setting icon");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: setting icon");
// setIcon(qPixmapFromMimeSource(QC_APP_ICON));
// setWindowIcon(qPixmapFromMimeSource(QC_APP_ICON));
setWindowIcon(QIcon(":/res/" QC_APP_ICON));
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating action handler");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating action handler");
actionHandler = new QG_ActionHandler(this);
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating action handler: OK");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating action handler: OK");
#ifdef RS_SCRIPTING
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating scripter");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating scripter");
scripter = new QS_Scripter(this, this);
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating scripter: OK");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating scripter: OK");
#endif
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init view");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init view");
initView();
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init toolbar");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init toolbar");
initToolBar();
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init actions");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init actions");
initActions();
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init menu bar");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init menu bar");
initMenuBar();
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init status bar");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init status bar");
initStatusBar();
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating dialogFactory");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating dialogFactory");
dialogFactory = new QC_DialogFactory(this, optionWidget);
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating dialogFactory: OK");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating dialogFactory: OK");
RS_DEBUG->print("setting dialog factory object");
if (RS_DialogFactory::instance() == NULL)
RS_DialogFactory::instance()->setFactoryObject(dialogFactory);
RS_DEBUG->print("setting dialog factory object: OK");
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init settings");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init settings");
initSettings();
- RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init MDI");
+ RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init MDI");
initMDI();
// Disable menu and toolbar items
/**
* Destructor.
*/
-QC_ApplicationWindow::~QC_ApplicationWindow()
+ApplicationWindow::~ApplicationWindow()
{
- RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow");
+ RS_DEBUG->print("ApplicationWindow::~ApplicationWindow");
#ifdef RS_SCRIPTING
- RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting scripter");
+ RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting scripter");
delete scripter;
- RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting scripter: OK");
+ RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting scripter: OK");
#endif
- RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting action handler");
+ RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting action handler");
delete actionHandler;
- RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting action handler: OK");
+ RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting action handler: OK");
- RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting dialog factory");
+ RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting dialog factory");
delete dialogFactory;
- RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting dialog factory: OK");
+ RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting dialog factory: OK");
-//no RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: "
+//no RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: "
// "deleting assistant..");
// if (assistant!=NULL) {
// delete assistant;
// }
-// RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: "
+// RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: "
// "deleting assistant: OK");
- RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: OK");
+ RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: OK");
}
/**
* Runs the start script if scripting is available.
*/
-void QC_ApplicationWindow::slotRunStartScript()
+void ApplicationWindow::slotRunStartScript()
{
slotRunScript("autostart.qs");
}
* Runs a script. The action that triggers this slot has to carry the
* name of the script file.
*/
-void QC_ApplicationWindow::slotRunScript()
+void ApplicationWindow::slotRunScript()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotRunScript");
+ RS_DEBUG->print("ApplicationWindow::slotRunScript");
const QObject * s = sender();
if (s != NULL)
{
QString script = ((QAction *)s)->text();
- RS_DEBUG->print("QC_ApplicationWindow::slotRunScript: %s", script.toLatin1().data());
+ RS_DEBUG->print("ApplicationWindow::slotRunScript: %s", script.toLatin1().data());
slotRunScript(script);
}
}
/**
* Runs the script with the given name.
*/
-void QC_ApplicationWindow::slotRunScript(const QString & name)
+void ApplicationWindow::slotRunScript(const QString & name)
{
#ifdef RS_SCRIPTING
- RS_DEBUG->print("QC_ApplicationWindow::slotRunScript");
+ RS_DEBUG->print("ApplicationWindow::slotRunScript");
if (scripter == NULL)
{
- RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotRunScript: scripter not initialized");
+ RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotRunScript: scripter not initialized");
return;
}
for (QStringList::Iterator it = scriptList.begin(); it!=scriptList.end(); ++it)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotRunScript: checking script '%s'", (*it).toLatin1().data();
+ RS_DEBUG->print("ApplicationWindow::slotRunScript: checking script '%s'", (*it).toLatin1().data();
QFileInfo fi(*it);
if (fi.exists() && fi.fileName() == name)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotRunScript: running '%s'", (*it).toLatin1().data());
+ RS_DEBUG->print("ApplicationWindow::slotRunScript: running '%s'", (*it).toLatin1().data());
scripter->runScript(*it, "main");
}
}
* Called from toolbar buttons that were added by scripts to
* insert blocks.
*/
-void QC_ApplicationWindow::slotInsertBlock()
+void ApplicationWindow::slotInsertBlock()
{
const QObject * s = sender();
if (s != NULL)
{
QString block = ((QAction *)s)->text();
- RS_DEBUG->print("QC_ApplicationWindow::slotInsertBlock: %s", block.toLatin1().data());
+ RS_DEBUG->print("ApplicationWindow::slotInsertBlock: %s", block.toLatin1().data());
slotInsertBlock(block);
}
}
/**
* Called to insert blocks.
*/
-void QC_ApplicationWindow::slotInsertBlock(const QString & name)
+void ApplicationWindow::slotInsertBlock(const QString & name)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotInsertBlock: '%s'", name.toLatin1().data());
+ RS_DEBUG->print("ApplicationWindow::slotInsertBlock: '%s'", name.toLatin1().data());
statusBar()->showMessage(tr("Inserting block '%1'").arg(name), 2000);
/**
* Shows the main application window and a splash screen.
*/
-void QC_ApplicationWindow::show()
+void ApplicationWindow::show()
{
#ifdef QSPLASHSCREEN_H
if (splash)
/**
* Called when the splash screen has to terminate.
*/
-void QC_ApplicationWindow::finishSplashScreen()
+void ApplicationWindow::finishSplashScreen()
{
#ifdef QSPLASHSCREEN_H
if (splash)
/**
* Close Event. Called when the user tries to close the app.
*/
-void QC_ApplicationWindow::closeEvent(QCloseEvent * /*ce*/)
+void ApplicationWindow::closeEvent(QCloseEvent * /*ce*/)
{
- RS_DEBUG->print("QC_ApplicationWindow::closeEvent()");
+ RS_DEBUG->print("ApplicationWindow::closeEvent()");
slotFileQuit();
- RS_DEBUG->print("QC_ApplicationWindow::closeEvent(): OK");
+ RS_DEBUG->print("ApplicationWindow::closeEvent(): OK");
}
/**
* Handles right-clicks for moving back to the last cad tool bar.
*/
-void QC_ApplicationWindow::mouseReleaseEvent(QMouseEvent * e)
+void ApplicationWindow::mouseReleaseEvent(QMouseEvent * e)
{
if (e->button() == Qt::RightButton && cadToolBar != NULL)
cadToolBar->showToolBarMain();
/**
* Initializes the MDI workspace.
*/
-void QC_ApplicationWindow::initMDI()
+void ApplicationWindow::initMDI()
{
- RS_DEBUG->print("QC_ApplicationWindow::initMDI() begin");
+ RS_DEBUG->print("ApplicationWindow::initMDI() begin");
/* Could use QVBoxLayout instead of Q3VBox, but do we even need to? */
// Q3VBox * vb = new Q3VBox(this);
// workspace->setScrollBarsEnabled(true);
// setCentralWidget(vb);
setCentralWidget(workspace);//JLH:hmm. (Yes, it works! \o/)
- RS_DEBUG->print("QC_ApplicationWindow::initMDI(): workspace=%08X", workspace);
+ RS_DEBUG->print("ApplicationWindow::initMDI(): workspace=%08X", workspace);
//#warning "Object::connect: No such signal QMdiArea::windowActivated(QWidget *)"
// connect(workspace, SIGNAL(windowActivated(QWidget *)), this, SLOT(slotWindowActivated(QWidget *)));
connect(workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this,
SLOT(slotWindowActivated(QMdiSubWindow *)));
- RS_DEBUG->print("QC_ApplicationWindow::initMDI() end");
+ RS_DEBUG->print("ApplicationWindow::initMDI() end");
}
/**
* (Actually, it creates all application menus & toolbars. All actions are
* created in CreateQtActions() and simply referenced here.)
*/
-void QC_ApplicationWindow::initActions()
+void ApplicationWindow::initActions()
{
- RS_DEBUG->print("QC_ApplicationWindow::initActions()");
+ RS_DEBUG->print("ApplicationWindow::initActions()");
CreateQtActions(this);
//
/**
* Initializes the menu bar.
*/
-void QC_ApplicationWindow::initMenuBar()
+void ApplicationWindow::initMenuBar()
{
- RS_DEBUG->print("QC_ApplicationWindow::initMenuBar()");
+ RS_DEBUG->print("ApplicationWindow::initMenuBar()");
// menuBar entry windowsMenu
windowsMenu = new QMenu(tr("&Window"), this);
/**
* Initializes the tool bars (file tool bar and pen tool bar).
*/
-void QC_ApplicationWindow::initToolBar()
+void ApplicationWindow::initToolBar()
{
- RS_DEBUG->print("QC_ApplicationWindow::initToolBar()");
+ RS_DEBUG->print("ApplicationWindow::initToolBar()");
// fileToolBar = new Q3ToolBar(this, "File Operations");
fileToolBar = addToolBar(tr("File Operations"));
/**
* Initializes the status bar at the bottom.
*/
-void QC_ApplicationWindow::initStatusBar()
+void ApplicationWindow::initStatusBar()
{
- RS_DEBUG->print("QC_ApplicationWindow::initStatusBar()");
+ RS_DEBUG->print("ApplicationWindow::initStatusBar()");
statusBar()->setMinimumHeight(32);
coordinateWidget = new CoordinateWidget(statusBar());//, "coordinates");
* Initializes the global application settings from the
* config file (unix, mac) or registry (windows).
*/
-void QC_ApplicationWindow::initSettings()
+void ApplicationWindow::initSettings()
{
- RS_DEBUG->print("QC_ApplicationWindow::initSettings()");
+ RS_DEBUG->print("ApplicationWindow::initSettings()");
settings.beginGroup("RecentFiles");
for(int i=0; i<recentFiles->Maximum(); ++i)
/**
* Stores the global application settings to file or registry.
*/
-void QC_ApplicationWindow::storeSettings()
+void ApplicationWindow::storeSettings()
{
- RS_DEBUG->print("QC_ApplicationWindow::storeSettings()");
+ RS_DEBUG->print("ApplicationWindow::storeSettings()");
settings.beginGroup("RecentFiles");
settings.setValue("DockWindows", saveState());
settings.endGroup();
- RS_DEBUG->print("QC_ApplicationWindow::storeSettings(): OK");
+ RS_DEBUG->print("ApplicationWindow::storeSettings(): OK");
}
/**
* Initializes the view.
*/
-void QC_ApplicationWindow::initView()
+void ApplicationWindow::initView()
{
- RS_DEBUG->print("QC_ApplicationWindow::initView()");
+ RS_DEBUG->print("ApplicationWindow::initView()");
RS_DEBUG->print("init view..");
QDockWidget * dw;
* Implementation from QG_MainWindowInterface.
* Can be called from scripts to add individual GUI elements.
*/
-/*QToolBar* QC_ApplicationWindow::createToolBar(const QString& name) {
+/*QToolBar* ApplicationWindow::createToolBar(const QString& name) {
QToolBar* tb = new QToolBar(this, name);
tb->setLabel(name);
return tb;
/**
* Creates a new button in the given tool bar for running a script.
*/
-/*void QC_ApplicationWindow::addToolBarButton(QToolBar* tb) {
+/*void ApplicationWindow::addToolBarButton(QToolBar* tb) {
if (tb!=NULL) {
QAction* action = new QAction("Blah",
QPixmap::fromMimeSource("zoomwindow.png"),
}
}*/
-#warning "!!! QC_ApplicationWindow::updateRecentFilesMenu() is DEPRECATED !!!"
+#warning "!!! ApplicationWindow::updateRecentFilesMenu() is DEPRECATED !!!"
/**
* Updates the recent file list in the file menu.
*/
-void QC_ApplicationWindow::updateRecentFilesMenu()
+void ApplicationWindow::updateRecentFilesMenu()
{
- RS_DEBUG->print("QC_ApplicationWindow::updateRecentFilesMenu()");
+ RS_DEBUG->print("ApplicationWindow::updateRecentFilesMenu()");
RS_DEBUG->print("Updating recent file menu...");
#if 0
}
}
#else
-//#warning "!!! Need to fix QC_ApplicationWindow::updateRecentFilesMenu() !!!"
+//#warning "!!! Need to fix ApplicationWindow::updateRecentFilesMenu() !!!"
recentFiles->UpdateGUI();
#endif
}
/**
* Goes back to the previous menu or one step in the current action.
*/
-void QC_ApplicationWindow::slotBack()
+void ApplicationWindow::slotBack()
{
RS_GraphicView * graphicView = getGraphicView();
/**
* Goes one step further in the current action.
*/
-void QC_ApplicationWindow::slotEnter()
+void ApplicationWindow::slotEnter()
{
if (commandWidget == NULL || !commandWidget->checkFocus())
{
/**
* Sets the keyboard focus on the command line.
*/
-void QC_ApplicationWindow::slotFocusCommandLine()
+void ApplicationWindow::slotFocusCommandLine()
{
if (commandWidget->isVisible())
commandWidget->setFocus();
/**
* Shows the given error on the command line.
*/
-void QC_ApplicationWindow::slotError(const QString & msg)
+void ApplicationWindow::slotError(const QString & msg)
{
commandWidget->appendHistory(msg);
}
* of a escape press from the layer widget (e.g after switching desktops
* in XP).
*/
-void QC_ApplicationWindow::slotFocus()
+void ApplicationWindow::slotFocus()
{
//QG_GraphicView* graphicView = getGraphicView();
/*if (graphicView!=NULL) {
/**
* Called when a document window was activated.
*/
-//void QC_ApplicationWindow::slotWindowActivated(QWidget *)
-void QC_ApplicationWindow::slotWindowActivated(QMdiSubWindow * /*w*/)
+void ApplicationWindow::slotWindowActivated(QMdiSubWindow * /*w*/)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotWindowActivated begin");
+ RS_DEBUG->print("ApplicationWindow::slotWindowActivated begin");
-//the following does: return (QC_MDIWindow *)workspace->activeSubWindow();
+//the following does: return (MDIWindow *)workspace->activeSubWindow();
//which means the subwindow is NOT being activated!!!
- QC_MDIWindow * m = getMDIWindow();
- RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "QC_ApplicationWindow::slotWindowActivated m=%08X", m);
+ MDIWindow * m = getMDIWindow();
+ RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m=%08X", m);
if (m)
- RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "QC_ApplicationWindow::slotWindowActivated m->getDoc=%08X", m->getDocument());
+ RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m->getDoc=%08X", m->getDocument());
if (m != NULL && m->getDocument() != NULL)
{
//m->setWindowState(WindowMaximized);
- RS_DEBUG->print("QC_ApplicationWindow::slotWindowActivated: document: %d", m->getDocument()->getId());
+ RS_DEBUG->print("ApplicationWindow::slotWindowActivated: document: %d", m->getDocument()->getId());
bool showByBlock = m->getDocument()->rtti() == RS2::EntityBlock;
layerWidget->setLayerList(m->getDocument()->getLayerList(), showByBlock);
// Disable/Enable menu and toolbar items
emit windowsChanged(m != NULL && m->getDocument() != NULL);
- RS_DEBUG->print("QC_ApplicationWindow::slotWindowActivated end");
+ RS_DEBUG->print("ApplicationWindow::slotWindowActivated end");
}
/**
* Called when the menu 'windows' is about to be shown.
* This is used to update the window list in the menu.
*/
-void QC_ApplicationWindow::slotWindowsMenuAboutToShow()
+void ApplicationWindow::slotWindowsMenuAboutToShow()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotWindowsMenuAboutToShow");
+ RS_DEBUG->print("ApplicationWindow::slotWindowsMenuAboutToShow");
windowsMenu->clear();
#if 0
* Called when the user selects a document window from the
* window list.
*/
-//void QC_ApplicationWindow::slotWindowsMenuActivated(int id)
-void QC_ApplicationWindow::slotWindowsMenuActivated(QAction * id)
+void ApplicationWindow::slotWindowsMenuActivated(QAction * id)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotWindowsMenuActivated");
+ RS_DEBUG->print("ApplicationWindow::slotWindowsMenuActivated");
// QMdiSubWindow * w = workspace->subWindowList().at(id);
QMdiSubWindow * w = workspace->subWindowList().at(id->data().toInt());
/**
* Tiles MDI windows horizontally.
*/
-void QC_ApplicationWindow::slotTileHorizontal()
+void ApplicationWindow::slotTileHorizontal()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTileHorizontal");
+ RS_DEBUG->print("ApplicationWindow::slotTileHorizontal");
#if 0
// primitive horizontal tiling
/**
* Tiles MDI windows vertically.
*/
-void QC_ApplicationWindow::slotTileVertical()
+void ApplicationWindow::slotTileVertical()
{
#if 0
workspace->tile();
*/
/*
#ifdef RS_CAM
-void QC_ApplicationWindow::slotCamExportAuto() {
+void ApplicationWindow::slotCamExportAuto() {
printf("CAM export..\n");
RS_Document* d = getDocument();
* Called when something changed in the pen tool bar
* (e.g. color, width, style).
*/
-void QC_ApplicationWindow::slotPenChanged(RS_Pen pen)
+void ApplicationWindow::slotPenChanged(RS_Pen pen)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotPenChanged() begin");
+ RS_DEBUG->print("ApplicationWindow::slotPenChanged() begin");
RS_DEBUG->print("Setting active pen...");
- QC_MDIWindow * m = getMDIWindow();
+ MDIWindow * m = getMDIWindow();
if (m != NULL)
m->slotPenChanged(pen);
- RS_DEBUG->print("QC_ApplicationWindow::slotPenChanged() end");
+ RS_DEBUG->print("ApplicationWindow::slotPenChanged() end");
}
/**
* Creates a new MDI window with the given document or a new
* document if 'doc' is NULL.
*/
-QC_MDIWindow * QC_ApplicationWindow::slotFileNew(RS_Document * doc)
+MDIWindow * ApplicationWindow::slotFileNew(RS_Document * doc)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFileNew() begin");
+ RS_DEBUG->print("ApplicationWindow::slotFileNew() begin");
static int id = 0;
id++;
#warning "QWidget::setMinimumSize: (/QMdi::ControlLabel) Negative sizes (-1,-1) are not possible"
RS_DEBUG->print(" creating MDI window");
-// QC_MDIWindow * w = new QC_MDIWindow(doc, workspace, 0, Qt::WA_DeleteOnClose);
- QC_MDIWindow * w = new QC_MDIWindow(doc, workspace, 0, Qt::SubWindow);
+// MDIWindow * w = new MDIWindow(doc, workspace, 0, Qt::WA_DeleteOnClose);
+ MDIWindow * w = new MDIWindow(doc, workspace, 0, Qt::SubWindow);
w->setAttribute(Qt::WA_DeleteOnClose);
// w->setWindowState(WindowMaximized);
connect(w, SIGNAL(signalClosing()), this, SLOT(slotFileClosing()));
QG_DIALOGFACTORY->setMainWindow(this);
#if 1 //bugfix for Qt3->4 conversion
- RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "QC_ApplicationWindow::slotFileNew: adding window to workspace...");
+ RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotFileNew: adding window to workspace...");
// workspace->addWindow(w);
workspace->addSubWindow(w);
#endif
//neither of these is working... Is the event being eaten somewhere???
// workspace->activateNextSubWindow();
// w->setFocus();
-//printf("--> QC_ApplicationWindow::slotFileNew(): w %s focus...\n", (w->hasFocus() ? "has" : "DOES NOT HAVE"));
+//printf("--> ApplicationWindow::slotFileNew(): w %s focus...\n", (w->hasFocus() ? "has" : "DOES NOT HAVE"));
#endif
#warning "!!! Parameter to slotWindowActivated() is ignored !!!"
slotWindowActivated(w);
statusBar()->showMessage(tr("New Drawing created."), 2000);
- RS_DEBUG->print("QC_ApplicationWindow::slotFileNew() OK");
+ RS_DEBUG->print("ApplicationWindow::slotFileNew() OK");
setFocus();
return w;
/**
* Menu file -> open.
*/
-void QC_ApplicationWindow::slotFileOpen()
+void ApplicationWindow::slotFileOpen()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen()");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen()");
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen() 001");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen() 001");
RS2::FormatType type = RS2::FormatUnknown;
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen() 002");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen() 002");
QString fileName = QG_FileDialog::getOpenFileName(this, &type);
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen() 003");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen() 003");
slotFileOpen(fileName, type);
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen(): OK");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen(): OK");
}
/**
* Called when a recently opened file is chosen from the list in the
* file menu.
*/
-//void QC_ApplicationWindow::slotFileOpenRecent(int id)
-void QC_ApplicationWindow::slotFileOpenRecent(void)
+void ApplicationWindow::slotFileOpenRecent(void)
{
#if 0
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpenRecent()");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpenRecent()");
statusBar()->showMessage(tr("Opening recent file..."));
QString fileName = recentFiles->get(id);
/**
* Menu file -> open.
*/
-void QC_ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType type)
+void ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType type)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen(..)");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen(..)");
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
if (!fileName.isEmpty())
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: creating new doc window");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen: creating new doc window");
// Create new document window:
- QC_MDIWindow * w = slotFileNew();
+ MDIWindow * w = slotFileNew();
// RS_APP->processEvents(1000);
//Really, is this needed???
// RS_APP->processEvents(QEventLoop::AllEvents, 1000);
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: linking layer list");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen: linking layer list");
// link the layer widget to the new document:
layerWidget->setLayerList(w->getDocument()->getLayerList(), false);
// link the block widget to the new document:
simulationControls->setGraphicView(w->getGraphicView());
#endif
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: open file");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen: open file");
// RS_APP->processEvents(1000);
//We no longer try to do Qt better than the Qt folks...
return;
}
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: open file: OK");
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: update recent file menu: 1");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen: open file: OK");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: 1");
// update recent files menu:
if (type == RS2::FormatDXF1)
else
recentFiles->add(fileName);
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: update recent file menu: 2");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: 2");
// updateRecentFilesMenu();
recentFiles->UpdateGUI();
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: update recent file menu: OK");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: OK");
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: set caption");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen: set caption");
// update caption:
// w->setCaption(fileName);
w->setWindowTitle(fileName);
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: set caption: OK");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen: set caption: OK");
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: update coordinate widget");
+ 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("QC_ApplicationWindow::slotFileOpen: update coordinate widget: OK");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen: update coordinate widget: OK");
// show output of filter (if any):
// commandWidget->processStderr();
}
QApplication::restoreOverrideCursor();
- RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen(..) OK");
+ RS_DEBUG->print("ApplicationWindow::slotFileOpen(..) OK");
}
/**
* Menu file -> save.
*/
-void QC_ApplicationWindow::slotFileSave()
+void ApplicationWindow::slotFileSave()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFileSave()");
+ RS_DEBUG->print("ApplicationWindow::slotFileSave()");
statusBar()->showMessage(tr("Saving drawing..."));
- QC_MDIWindow * w = getMDIWindow();
+ MDIWindow * w = getMDIWindow();
QString name;
if (w != NULL)
/**
* Menu file -> save as.
*/
-void QC_ApplicationWindow::slotFileSaveAs()
+void ApplicationWindow::slotFileSaveAs()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFileSaveAs()");
+ RS_DEBUG->print("ApplicationWindow::slotFileSaveAs()");
statusBar()->showMessage(tr("Saving drawing under new filename..."));
- QC_MDIWindow * w = getMDIWindow();
+ MDIWindow * w = getMDIWindow();
QString name;
if (w != NULL)
/**
* Menu file -> export.
*/
-void QC_ApplicationWindow::slotFileExport()
+void ApplicationWindow::slotFileExport()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFileExport()");
+ RS_DEBUG->print("ApplicationWindow::slotFileExport()");
statusBar()->showMessage(tr("Exporting drawing..."));
- QC_MDIWindow * w = getMDIWindow();
+ MDIWindow * w = getMDIWindow();
QString fn;
if (w != NULL)
* @param black true: Black background, false: white
* @param bw true: black/white export, false: color
*/
-bool QC_ApplicationWindow::slotFileExport(const QString & name, const QString & format, QSize size, bool black, bool bw)
+bool ApplicationWindow::slotFileExport(const QString & name, const QString & format, QSize size, bool black, bool bw)
{
- QC_MDIWindow * w = getMDIWindow();
+ MDIWindow * w = getMDIWindow();
if (w == NULL)
{
- RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotFileExport: no window opened");
+ RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFileExport: no window opened");
return false;
}
if (graphic == NULL)
{
- RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotFileExport: no graphic");
+ RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFileExport: no graphic");
return false;
}
/**
* Menu file -> close.
*/
-void QC_ApplicationWindow::slotFileClose()
+void ApplicationWindow::slotFileClose()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFileClose()");
+ RS_DEBUG->print("ApplicationWindow::slotFileClose()");
- QC_MDIWindow * m = getMDIWindow();
+ MDIWindow * m = getMDIWindow();
if (m != NULL)
// m->close(true);
* Called when a MDI window is actually about to close. Used to
* detach widgets from the document.
*/
-void QC_ApplicationWindow::slotFileClosing()
+void ApplicationWindow::slotFileClosing()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFileClosing()");
+ RS_DEBUG->print("ApplicationWindow::slotFileClosing()");
RS_DEBUG->print("detaching lists");
layerWidget->setLayerList(NULL, false);
/**
* Menu file -> print.
*/
-void QC_ApplicationWindow::slotFilePrint()
+void ApplicationWindow::slotFilePrint()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFilePrint()");
+ RS_DEBUG->print("ApplicationWindow::slotFilePrint()");
- QC_MDIWindow * w = getMDIWindow();
+ MDIWindow * w = getMDIWindow();
if (w == NULL)
{
- RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotFilePrint: no window opened");
+ RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFilePrint: no window opened");
return;
}
if (graphic == NULL)
{
- RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotFilePrint: no graphic");
+ RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFilePrint: no graphic");
return;
}
/**
* Menu file -> print preview.
*/
-void QC_ApplicationWindow::slotFilePrintPreview(bool on)
+void ApplicationWindow::slotFilePrintPreview(bool on)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFilePrintPreview()");
+ RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview()");
RS_DEBUG->print(" creating MDI window");
- QC_MDIWindow * parent = getMDIWindow();
+ MDIWindow * parent = getMDIWindow();
if (parent == NULL)
{
- RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotFilePrintPreview: no window opened");
+ RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFilePrintPreview: no window opened");
return;
}
// close print preview:
if (!on)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFilePrintPreview(): off");
+ RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): off");
if (parent->getGraphicView()->isPrintPreview())
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFilePrintPreview(): close");
+ RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): close");
slotFileClose();
}
}
else
{
// look for an existing print preview:
- QC_MDIWindow * ppv = parent->getPrintPreview();
+ MDIWindow * ppv = parent->getPrintPreview();
if (ppv != NULL)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFilePrintPreview(): show existing");
+ RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): show existing");
slotWindowActivated(ppv);
ppv->showNormal();
}
{
if (!parent->getGraphicView()->isPrintPreview())
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFilePrintPreview(): create");
+ RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): create");
- QC_MDIWindow * w = new QC_MDIWindow(parent->getDocument(), workspace, 0, Qt::SubWindow);
+ MDIWindow * w = new MDIWindow(parent->getDocument(), workspace, 0, Qt::SubWindow);
w->setAttribute(Qt::WA_DeleteOnClose);
parent->addChildWindow(w);
//connect(w, SIGNAL(signalClosing()),
/**
* Menu file -> quit.
*/
-void QC_ApplicationWindow::slotFileQuit()
+void ApplicationWindow::slotFileQuit()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotFileQuit()");
+ RS_DEBUG->print("ApplicationWindow::slotFileQuit()");
statusBar()->showMessage(tr("Exiting application..."));
/**
* Forces termination of QCad (demo version).
*/
-void QC_ApplicationWindow::slotFileDemoQuit()
+void ApplicationWindow::slotFileDemoQuit()
{
statusBar()->showMessage(tr("Exiting application..."));
*
* @param toggle true: show, false: hide.
*/
-void QC_ApplicationWindow::slotViewGrid(bool toggle)
+void ApplicationWindow::slotViewGrid(bool toggle)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotViewGrid()");
+ RS_DEBUG->print("ApplicationWindow::slotViewGrid()");
- QC_MDIWindow * m = getMDIWindow();
+ MDIWindow * m = getMDIWindow();
if (m != NULL)
{
updateGrids();
redrawAll();
- RS_DEBUG->print("QC_ApplicationWindow::slotViewGrid() OK");
+ RS_DEBUG->print("ApplicationWindow::slotViewGrid() OK");
}
/**
*
* @param toggle true: enable, false: disable.
*/
-void QC_ApplicationWindow::slotViewDraft(bool toggle)
+void ApplicationWindow::slotViewDraft(bool toggle)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotViewDraft()");
+ RS_DEBUG->print("ApplicationWindow::slotViewDraft()");
- /*QC_MDIWindow* m = getMDIWindow();
+ /*MDIWindow* m = getMDIWindow();
if (m!=NULL) {
Drawing* g = m->getGraphic();
if (g!=NULL) {
/**
* Redraws all mdi windows.
*/
-void QC_ApplicationWindow::redrawAll()
+void ApplicationWindow::redrawAll()
{
if (workspace != NULL)
{
for(int i=0; i<int(windows.count()); ++i)
{
- QC_MDIWindow * m = (QC_MDIWindow *)windows.at(i);
+ MDIWindow * m = (MDIWindow *)windows.at(i);
if (m != NULL)
{
/**
* Updates all grids of all graphic views.
*/
-void QC_ApplicationWindow::updateGrids()
+void ApplicationWindow::updateGrids()
{
if (workspace != NULL)
{
for(int i=0; i<int(windows.count()); ++i)
{
- QC_MDIWindow * m = (QC_MDIWindow *)windows.at(i);
+ MDIWindow * m = (MDIWindow *)windows.at(i);
if (m != NULL)
{
*
* @param showSB true: show, false: hide.
*/
-void QC_ApplicationWindow::slotViewStatusBar(bool showSB)
+void ApplicationWindow::slotViewStatusBar(bool showSB)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotViewStatusBar()");
+ RS_DEBUG->print("ApplicationWindow::slotViewStatusBar()");
if (showSB)
statusBar()->show();
*
* @param toggle true: show, false: hide.
*/
-/*void QC_ApplicationWindow::slotViewLayerList(bool toggle) {
- RS_DEBUG->print("QC_ApplicationWindow::slotViewLayerList()");
+/*void ApplicationWindow::slotViewLayerList(bool toggle) {
+ RS_DEBUG->print("ApplicationWindow::slotViewLayerList()");
if (toggle==false) {
layerDockWindow->hide();
* @param toggle true: show, false: hide.
*/
/*
-void QC_ApplicationWindow::slotViewBlockList(bool toggle) {
- RS_DEBUG->print("QC_ApplicationWindow::slotViewBlockList()");
+void ApplicationWindow::slotViewBlockList(bool toggle) {
+ RS_DEBUG->print("ApplicationWindow::slotViewBlockList()");
if (toggle==false) {
blockDockWindow->hide();
* @param toggle true: show, false: hide.
*/
/*
-void QC_ApplicationWindow::slotViewCommandLine(bool toggle) {
- RS_DEBUG->print("QC_ApplicationWindow::slotViewCommandLine()");
+void ApplicationWindow::slotViewCommandLine(bool toggle) {
+ RS_DEBUG->print("ApplicationWindow::slotViewCommandLine()");
if (toggle==false) {
commandDockWindow->hide();
* @param toggle true: show, false: hide.
*/
/*
-void QC_ApplicationWindow::slotViewOptionToolbar(bool toggle) {
- RS_DEBUG->print("QC_ApplicationWindow::slotViewOptionToolbar()");
+void ApplicationWindow::slotViewOptionToolbar(bool toggle) {
+ RS_DEBUG->print("ApplicationWindow::slotViewOptionToolbar()");
if (toggle==false) {
optionWidget->hide();
* Creates a new MDI window for editing the selected block.
*/
/*
-void QC_ApplicationWindow::slotBlocksEdit() {
- RS_DEBUG->print("QC_ApplicationWindow::slotBlocksEdit()");
+void ApplicationWindow::slotBlocksEdit() {
+ RS_DEBUG->print("ApplicationWindow::slotBlocksEdit()");
- QC_MDIWindow* parent = getMDIWindow();
+ MDIWindow* parent = getMDIWindow();
if (parent!=NULL) {
RS_BlockList* blist = blockWidget->getBlockList();
if (blist!=NULL) {
RS_Block* blk = blist->getActiveBlock();
if (blk!=NULL) {
- QC_MDIWindow* w = slotFileNew(blk);
+ MDIWindow* w = slotFileNew(blk);
// the parent needs a pointer to the block window and
// vice versa
parent->addChildWindow(w);
/**
* Shows the dialog for general application preferences.
*/
-void QC_ApplicationWindow::slotOptionsGeneral()
+void ApplicationWindow::slotOptionsGeneral()
{
RS_DIALOGFACTORY->requestOptionsGeneralDialog();
for(int i=0; i<int(windows.count()); ++i)
{
- QC_MDIWindow * m = (QC_MDIWindow *)windows.at(i);
+ MDIWindow * m = (MDIWindow *)windows.at(i);
if (m != NULL)
{
/**
* Menu script -> show ide
*/
-void QC_ApplicationWindow::slotScriptOpenIDE()
+void ApplicationWindow::slotScriptOpenIDE()
{
#ifdef RS_SCRIPTING
scripter->openIDE();
/**
* Menu script -> run
*/
-void QC_ApplicationWindow::slotScriptRun()
+void ApplicationWindow::slotScriptRun()
{
#ifdef RS_SCRIPTING
scripter->runScript();
/**
* Menu help -> about.
*/
-void QC_ApplicationWindow::slotHelpAbout()
+void ApplicationWindow::slotHelpAbout()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotHelpAbout()");
+ RS_DEBUG->print("ApplicationWindow::slotHelpAbout()");
QStringList modules;
#ifdef RS_CAM
/**
* Menu help -> help.
*/
-void QC_ApplicationWindow::slotHelpManual()
+void ApplicationWindow::slotHelpManual()
{
#warning "No help system ported to Qt4... !!! FIX !!!"
#if 0
- RS_DEBUG->print("QC_ApplicationWindow::slotHelpManual()");
+ RS_DEBUG->print("ApplicationWindow::slotHelpManual()");
if (assistant == NULL)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotHelpManual(): appdir: %s", RS_SYSTEM->getAppDir().toLatin1().data());
- RS_DEBUG->print("QC_ApplicationWindow::slotHelpManual(): appdir: %s", RS_SYSTEM->getAppDir().toLatin1().data());
+ RS_DEBUG->print("ApplicationWindow::slotHelpManual(): appdir: %s", RS_SYSTEM->getAppDir().toLatin1().data());
+ RS_DEBUG->print("ApplicationWindow::slotHelpManual(): appdir: %s", RS_SYSTEM->getAppDir().toLatin1().data());
assistant = new QAssistantClient(RS_SYSTEM->getAppDir()+"/bin", this);
connect(assistant, SIGNAL(error(const QString&)), this, SLOT(slotError(const QString&)));
QStringList args;
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
+void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestDumpEntities()");
+ RS_DEBUG->print("ApplicationWindow::slotTestDumpEntities()");
static int level = 0;
std::ofstream dumpFile;
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestDumpUndo()
+void ApplicationWindow::slotTestDumpUndo()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestDumpUndo()");
+ RS_DEBUG->print("ApplicationWindow::slotTestDumpUndo()");
RS_Document * d = getDocument();
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestUpdateInserts()
+void ApplicationWindow::slotTestUpdateInserts()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestUpdateInserts()");
+ RS_DEBUG->print("ApplicationWindow::slotTestUpdateInserts()");
RS_Document * d = getDocument();
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestDrawFreehand()
+void ApplicationWindow::slotTestDrawFreehand()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestDrawFreehand()");
+ RS_DEBUG->print("ApplicationWindow::slotTestDrawFreehand()");
//Drawing* g = document->getMarking();
/*
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestInsertBlock()
+void ApplicationWindow::slotTestInsertBlock()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestInsertBlock()");
+ RS_DEBUG->print("ApplicationWindow::slotTestInsertBlock()");
RS_Document * d = getDocument();
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestInsertEllipse()
+void ApplicationWindow::slotTestInsertEllipse()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestInsertEllipse()");
+ RS_DEBUG->print("ApplicationWindow::slotTestInsertEllipse()");
RS_Document * d = getDocument();
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestInsertText()
+void ApplicationWindow::slotTestInsertText()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestInsertText()");
+ RS_DEBUG->print("ApplicationWindow::slotTestInsertText()");
RS_Document * d = getDocument();
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestInsertImage()
+void ApplicationWindow::slotTestInsertImage()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestInsertImage()");
+ RS_DEBUG->print("ApplicationWindow::slotTestInsertImage()");
RS_Document * d = getDocument();
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestUnicode()
+void ApplicationWindow::slotTestUnicode()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestUnicode()");
+ RS_DEBUG->print("ApplicationWindow::slotTestUnicode()");
slotFileOpen("./fonts/unicode.cxf", RS2::FormatCXF);
RS_Document* d = getDocument();
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestMath01()
+void ApplicationWindow::slotTestMath01()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestMath01()");
+ RS_DEBUG->print("ApplicationWindow::slotTestMath01()");
RS_Document* d = getDocument();
if (d!=NULL) {
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestResize640()
+void ApplicationWindow::slotTestResize640()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestResize640()");
+ RS_DEBUG->print("ApplicationWindow::slotTestResize640()");
resize(640, 480);
}
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestResize800()
+void ApplicationWindow::slotTestResize800()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestResize800()");
+ RS_DEBUG->print("ApplicationWindow::slotTestResize800()");
resize(800, 600);
}
/**
* Testing function.
*/
-void QC_ApplicationWindow::slotTestResize1024()
+void ApplicationWindow::slotTestResize1024()
{
- RS_DEBUG->print("QC_ApplicationWindow::slotTestResize1024()");
+ RS_DEBUG->print("ApplicationWindow::slotTestResize1024()");
resize(1024, 768);
}
/**
* overloaded for Message box on last window exit.
*/
-bool QC_ApplicationWindow::queryExit(bool force)
+bool ApplicationWindow::queryExit(bool force)
{
- RS_DEBUG->print("QC_ApplicationWindow::queryExit()");
+ RS_DEBUG->print("ApplicationWindow::queryExit()");
bool succ = true;
// for(QWidget * w=list.first(); w!=NULL; w=list.next())
for(int i=0; i<list.size(); i++)
{
- succ = ((QC_MDIWindow *)list[i])->closeMDI(force);
+ succ = ((MDIWindow *)list[i])->closeMDI(force);
if (!succ)
break;
if (succ)
storeSettings();
- RS_DEBUG->print("QC_ApplicationWindow::queryExit(): OK");
+ RS_DEBUG->print("ApplicationWindow::queryExit(): OK");
return succ;
}
* it will consume them also if a text field is active
* which means it's impossible to enter a command.
*/
-void QC_ApplicationWindow::keyPressEvent(QKeyEvent * e)
+void ApplicationWindow::keyPressEvent(QKeyEvent * e)
{
// timer
static QTime ts = QTime();
QMainWindow::keyPressEvent(e);
}
-void QC_ApplicationWindow::keyReleaseEvent(QKeyEvent * e)
+void ApplicationWindow::keyReleaseEvent(QKeyEvent * e)
{
switch (e->key())
{
/**
* @return Pointer to application window.
*/
-/*static*/ QC_ApplicationWindow * QC_ApplicationWindow::getAppWindow()
+/*static*/ ApplicationWindow * ApplicationWindow::getAppWindow()
{
return appWindow;
}
/**
* @return Pointer to workspace.
*/
-QMdiArea * QC_ApplicationWindow::getWorkspace()
+QMdiArea * ApplicationWindow::getWorkspace()
{
return workspace;
}
* @return Pointer to the currently active MDI Window or NULL if no
* MDI Window is active.
*/
-QC_MDIWindow * QC_ApplicationWindow::getMDIWindow()
+MDIWindow * ApplicationWindow::getMDIWindow()
{
- RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "QC_ApplicationWindow::getMDIWindow: workspace=%08X", workspace);
+ RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::getMDIWindow: workspace=%08X", workspace);
if (workspace != NULL)
{
- RS_DEBUG->print("QC_ApplicationWindow::getMDIWindow: activeSubWindow=%08X", workspace->activeSubWindow());
- return (QC_MDIWindow *)workspace->activeSubWindow();
+ RS_DEBUG->print("ApplicationWindow::getMDIWindow: activeSubWindow=%08X", workspace->activeSubWindow());
+ return (MDIWindow *)workspace->activeSubWindow();
}
- RS_DEBUG->print("QC_ApplicationWindow::getMDIWindow: activeSubWindow=??? (workspace == NULL)");
+ RS_DEBUG->print("ApplicationWindow::getMDIWindow: activeSubWindow=??? (workspace == NULL)");
return NULL;
}
* @return Pointer to the graphic view of the currently active document
* window or NULL if no window is available.
*/
-/*virtual*/ RS_GraphicView * QC_ApplicationWindow::getGraphicView()
+/*virtual*/ RS_GraphicView * ApplicationWindow::getGraphicView()
{
- QC_MDIWindow * m = getMDIWindow();
+ MDIWindow * m = getMDIWindow();
if (m != NULL)
return m->getGraphicView();
* @return Pointer to the graphic document of the currently active document
* window or NULL if no window is available.
*/
-/*virtual*/ RS_Document * QC_ApplicationWindow::getDocument()
+/*virtual*/ RS_Document * ApplicationWindow::getDocument()
{
- QC_MDIWindow * m = getMDIWindow();
+ MDIWindow * m = getMDIWindow();
if (m != NULL)
return m->getDocument();
/**
* Creates a new document. Implementation from RS_MainWindowInterface.
*/
-/*virtual*/ void QC_ApplicationWindow::createNewDocument(const QString & fileName/*= QString::null*/,
+/*virtual*/ void ApplicationWindow::createNewDocument(const QString & fileName/*= QString::null*/,
RS_Document * doc/*= NULL*/)
{
slotFileNew(doc);
*
* @return Pointer to this.
*/
-// /*virtual*/ Q3MainWindow * QC_ApplicationWindow::GetMainWindow()
-/*virtual*/ QMainWindow * QC_ApplicationWindow::GetMainWindow()
+/*virtual*/ QMainWindow * ApplicationWindow::GetMainWindow()
{
return this;
}
/**
* @return Pointer to action handler. Implementation from QG_MainWindowInterface.
*/
-/*virtual*/ QG_ActionHandler * QC_ApplicationWindow::getActionHandler()
+/*virtual*/ QG_ActionHandler * ApplicationWindow::getActionHandler()
{
return actionHandler;
}
/**
* Implementation from QG_MainWindowInterface.
*/
-/*virtual*/ void QC_ApplicationWindow::showSimulationControls()
+/*virtual*/ void ApplicationWindow::showSimulationControls()
{
#ifdef RS_CAM
simulationDockWindow->show();
/**
* @return Pointer to the qsa object.
*/
-QSProject * QC_ApplicationWindow::getQSAProject()
+QSProject * ApplicationWindow::getQSAProject()
{
if (scripter != NULL)
return scripter->getQSAProject();
/**
* Implementation from QG_MainWindowInterface.
*/
-/*virtual*/ void QC_ApplicationWindow::setFocus2()
+/*virtual*/ void ApplicationWindow::setFocus2()
{
setFocus();
}