]> Shamusworld >> Repos - architektonas/commitdiff
Sanity check step 1: Renaming files...
authorShamus Hammons <jlhamm@acm.org>
Wed, 4 Aug 2010 04:42:12 +0000 (04:42 +0000)
committerShamus Hammons <jlhamm@acm.org>
Wed, 4 Aug 2010 04:42:12 +0000 (04:42 +0000)
33 files changed:
architektonas.pro
src/base/rs_pen.h
src/base/rs_scriptlist.h
src/base/rs_selection.cpp
src/base/rs_selection.h
src/mainapp/commands.h
src/widgets/actionhandler.cpp [moved from src/widgets/qg_actionhandler.cpp with 99% similarity]
src/widgets/actionhandler.h [moved from src/widgets/qg_actionhandler.h with 98% similarity]
src/widgets/blockwidget.cpp [moved from src/widgets/qg_blockwidget.cpp with 99% similarity]
src/widgets/blockwidget.h [moved from src/widgets/qg_blockwidget.h with 86% similarity]
src/widgets/colorbox.cpp [moved from src/widgets/qg_colorbox.cpp with 99% similarity]
src/widgets/colorbox.h [moved from src/widgets/qg_colorbox.h with 91% similarity]
src/widgets/commandedit.cpp [moved from src/widgets/qg_commandedit.cpp with 74% similarity]
src/widgets/commandedit.h [moved from src/widgets/qg_commandedit.h with 88% similarity]
src/widgets/filedialog.cpp [moved from src/widgets/qg_filedialog.cpp with 99% similarity]
src/widgets/filedialog.h [moved from src/widgets/qg_filedialog.h with 82% similarity]
src/widgets/fontbox.cpp [moved from src/widgets/qg_fontbox.cpp with 98% similarity]
src/widgets/fontbox.h [moved from src/widgets/qg_fontbox.h with 86% similarity]
src/widgets/layerbox.cpp [moved from src/widgets/qg_layerbox.cpp with 98% similarity]
src/widgets/layerbox.h [moved from src/widgets/qg_layerbox.h with 90% similarity]
src/widgets/layerwidget.cpp [moved from src/widgets/qg_layerwidget.cpp with 99% similarity]
src/widgets/layerwidget.h [moved from src/widgets/qg_layerwidget.h with 86% similarity]
src/widgets/linetypebox.cpp [moved from src/widgets/qg_linetypebox.cpp with 99% similarity]
src/widgets/linetypebox.h [moved from src/widgets/qg_linetypebox.h with 90% similarity]
src/widgets/listviewitem.cpp [moved from src/widgets/qg_listviewitem.cpp with 77% similarity]
src/widgets/listviewitem.h [moved from src/widgets/qg_listviewitem.h with 89% similarity]
src/widgets/patternbox.cpp [moved from src/widgets/qg_patternbox.cpp with 97% similarity]
src/widgets/patternbox.h [moved from src/widgets/qg_patternbox.h with 86% similarity]
src/widgets/pentoolbar.cpp [moved from src/widgets/qg_pentoolbar.cpp with 96% similarity]
src/widgets/pentoolbar.h [moved from src/widgets/qg_pentoolbar.h with 91% similarity]
src/widgets/qg_graphicview.h
src/widgets/widthbox.cpp [moved from src/widgets/qg_widthbox.cpp with 83% similarity]
src/widgets/widthbox.h [moved from src/widgets/qg_widthbox.h with 90% similarity]

index ede199f390b173dec4e90975fb56355df5ed0fe4..2e5452183ea2a033b889f9d35ec3c9eb7ec5aea6 100644 (file)
@@ -157,6 +157,7 @@ SOURCES = \
        src/base/paintinterface.cpp \
        src/base/rs_pattern.cpp \
        src/base/rs_patternlist.cpp \
+       src/base/rs_pen.cpp \
        src/base/rs_point.cpp \
        src/base/rs_polyline.cpp \
        src/base/rs_preview.cpp \
@@ -469,23 +470,23 @@ HEADERS += \
        src/forms/textoptions.h \
        src/forms/trimamountoptions.h \
        src/forms/widgetpen.h \
-       src/widgets/qg_actionhandler.h \
-       src/widgets/qg_blockwidget.h \
-       src/widgets/qg_colorbox.h \
-       src/widgets/qg_commandedit.h \
+       src/widgets/actionhandler.h \
+       src/widgets/blockwidget.h \
+       src/widgets/colorbox.h \
+       src/widgets/commandedit.h \
        src/widgets/qg_dialogfactory.h \
-       src/widgets/qg_filedialog.h \
-       src/widgets/qg_fontbox.h \
+       src/widgets/filedialog.h \
+       src/widgets/fontbox.h \
        src/widgets/qg_graphicview.h \
-       src/widgets/qg_layerbox.h \
-       src/widgets/qg_layerwidget.h \
-       src/widgets/qg_linetypebox.h \
-       src/widgets/qg_listviewitem.h \
+       src/widgets/layerbox.h \
+       src/widgets/layerwidget.h \
+       src/widgets/linetypebox.h \
+       src/widgets/listviewitem.h \
        src/widgets/qg_mainwindowinterface.h \
-       src/widgets/qg_patternbox.h \
-       src/widgets/qg_pentoolbar.h \
+       src/widgets/patternbox.h \
+       src/widgets/pentoolbar.h \
        src/widgets/recentfiles.h \
-       src/widgets/qg_widthbox.h
+       src/widgets/widthbox.h
 
 SOURCES += \
        src/forms/arcoptions.cpp \
@@ -558,22 +559,22 @@ SOURCES += \
        src/forms/textoptions.cpp \
        src/forms/trimamountoptions.cpp \
        src/forms/widgetpen.cpp \
-       src/widgets/qg_actionhandler.cpp \
-       src/widgets/qg_blockwidget.cpp \
-       src/widgets/qg_colorbox.cpp \
-       src/widgets/qg_commandedit.cpp \
+       src/widgets/actionhandler.cpp \
+       src/widgets/blockwidget.cpp \
+       src/widgets/colorbox.cpp \
+       src/widgets/commandedit.cpp \
        src/widgets/qg_dialogfactory.cpp \
-       src/widgets/qg_filedialog.cpp \
-       src/widgets/qg_fontbox.cpp \
+       src/widgets/filedialog.cpp \
+       src/widgets/fontbox.cpp \
        src/widgets/qg_graphicview.cpp \
-       src/widgets/qg_layerbox.cpp \
-       src/widgets/qg_layerwidget.cpp \
-       src/widgets/qg_linetypebox.cpp \
-       src/widgets/qg_listviewitem.cpp \
-       src/widgets/qg_patternbox.cpp \
-       src/widgets/qg_pentoolbar.cpp \
+       src/widgets/layerbox.cpp \
+       src/widgets/layerwidget.cpp \
+       src/widgets/linetypebox.cpp \
+       src/widgets/listviewitem.cpp \
+       src/widgets/patternbox.cpp \
+       src/widgets/pentoolbar.cpp \
        src/widgets/recentfiles.cpp \
-       src/widgets/qg_widthbox.cpp
+       src/widgets/widthbox.cpp
 
 FORMS = \
        src/forms/blockdialog.ui \
index 21b3729c299d5d467034728a9789c28447e7c96b..4d6c9c07dad228b8a2b64885b035198d45d3c11d 100644 (file)
  * A pen stores attributes for painting such as line width,
  * linetype, color, ...
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
 class RS_Pen: public RS_Flags
 {
-public:
-    /**
-     * Creates a default pen (black, solid, width 0).
-     */
-    RS_Pen() : RS_Flags() {
-        setColor(RS_Color(0,0,0));
-        setWidth(RS2::Width00);
-        setLineType(RS2::SolidLine);
-               setScreenWidth(0);
-    }
-    /**
-     * Creates a pen with the given attributes.
-     */
-    RS_Pen(const RS_Color& c,
-           RS2::LineWidth w,
-           RS2::LineType t) : RS_Flags() {
-        setColor(c);
-        setWidth(w);
-        setLineType(t);
-               setScreenWidth(0);
-    }
-    /**
-     * Creates a default pen with the given flags. This is
-     * usually used to create invalid pens.
-     *
-     * e.g.:
-     * <pre>
-     *   RS_Pen p(RS2::FlagInvalid);
-     * </pre>
-     */
-    RS_Pen(unsigned int f) : RS_Flags(f) {
-        setColor(RS_Color(0,0,0));
-        setWidth(RS2::Width00);
-        setLineType(RS2::SolidLine);
-               setScreenWidth(0);
-    }
-    //RS_Pen(const RS_Pen& pen) : RS_Flags(pen.getFlags()) {
-    //    lineType = pen.lineType;
-    //    width = pen.width;
-    //    color = pen.color;
-    //}
-    virtual ~RS_Pen() {}
-
-    RS2::LineType getLineType() const {
-        return lineType;
-    }
-    void setLineType(RS2::LineType t) {
-        lineType = t;
-    }
-    RS2::LineWidth getWidth() const {
-        return width;
-    }
-    void setWidth(RS2::LineWidth w) {
-        width = w;
-    }
-    double getScreenWidth() const {
-        return screenWidth;
-    }
-    void setScreenWidth(double w) {
-        screenWidth = w;
-    }
-    const RS_Color& getColor() const {
-        return color;
-    }
-    void setColor(const RS_Color& c) {
-        color = c;
-    }
-    bool isValid() {
-        return !getFlag(RS2::FlagInvalid);
-    }
-
-    //RS_Pen& operator = (const RS_Pen& p) {
-    //    lineType = p.lineType;
-    //    width = p.width;
-    //    color = p.color;
-    //    setFlags(p.getFlags());
-
-    //    return *this;
-    //}
-
-    bool operator == (const RS_Pen& p) const {
-        return (lineType==p.lineType && width==p.width && color==p.color);
-    }
-
-    bool operator != (const RS_Pen& p) const {
-        return !(*this==p);
-    }
-
-    friend std::ostream& operator << (std::ostream& os, const RS_Pen& p) {
-        //os << "style: " << p.style << std::endl;
-        os << " pen color: " << p.getColor()
-        << " pen width: " << p.getWidth()
-        << " pen screen width: " << p.getScreenWidth()
-        << " pen line type: " << p.getLineType()
-        << " flags: " << (p.getFlag(RS2::FlagInvalid) ? "INVALID" : "")
-        << std::endl;
-        return os;
-    }
-
-protected:
-    RS2::LineType lineType;
-    RS2::LineWidth width;
-       double screenWidth;
-    RS_Color color;
+       public:
+               RS_Pen();
+               RS_Pen(const RS_Color & c, RS2::LineWidth w, RS2::LineType t);
+               RS_Pen(unsigned int f);
+               virtual ~RS_Pen();
+
+               RS2::LineType getLineType() const;
+               void setLineType(RS2::LineType t);
+               RS2::LineWidth getWidth() const;
+               void setWidth(RS2::LineWidth w);
+               double getScreenWidth() const;
+               void setScreenWidth(double w);
+               const RS_Color & getColor() const;
+               void setColor(const RS_Color & c);
+               bool isValid();
+               bool operator==(const RS_Pen & p) const;
+               bool operator!=(const RS_Pen & p) const;
+
+               friend std::ostream & operator<<(std::ostream & os, const RS_Pen & p);
+
+       protected:
+               RS2::LineType lineType;
+               RS2::LineWidth width;
+               double screenWidth;
+               RS_Color color;
 };
 
 #endif
index c3de735bdfc0160b503f7231fd5ae89de1fc10e5..ca45ec3823dbbf06162e9b4a5c5e06489410600c 100644 (file)
@@ -37,7 +37,6 @@ class RS_ScriptList
 
        private:
                //! all scripts available
-//             Q3PtrList<RS_Script> scripts;
                QList<RS_Script *> scripts;
                QListIterator<RS_Script *> scriptIterator;
 };
index fef508029f86becf8a903151c5d8fbb1fb6afea4..60863ca1fc36e5ca0aa86ccae747311abdddb603 100644 (file)
 
 #include "rs_selection.h"
 
+#include "drawing.h"
+#include "rs_entity.h"
+#include "graphicview.h"
 #include "rs_information.h"
 #include "rs_polyline.h"
-#include "rs_entity.h"
-#include "drawing.h"
 
 /**
  * Default constructor.
@@ -40,7 +41,7 @@ RS_Selection::RS_Selection(RS_EntityContainer & container, GraphicView * graphic
  */
 void RS_Selection::selectSingle(RS_Entity * e)
 {
-       if (e != NULL && (e->getLayer() == NULL || e->getLayer()->isLocked() == false))
+       if (e && (e->getLayer() == NULL || e->getLayer()->isLocked() == false))
        {
 // Same problem as below...
 //[WAS]#warning "!!! This is causing a segfault in the draw code !!!"
index e0dfea6b431522d3d9b93a7a6ffbc6d13bf5d255..2e6ffb3271f779486c516c06ca49edefc8cb1f86 100644 (file)
@@ -2,7 +2,9 @@
 #define RS_SELECTION_H
 
 #include "rs_entitycontainer.h"
-#include "graphicview.h"
+
+class Drawing;
+class GraphicView;
 
 /**
  * API Class for selecting entities.
index 12c713cbcc0347aaed4fb59b0251e47a547a697e..abe6c44d7ca4b59d83e96492d0c4deeb640def03 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef RS_COMMANDS_H
-#define RS_COMMANDS_H
+#ifndef __COMMANDS_H__
+#define __COMMANDS_H__
 
 #include <QtCore>
 #include "rs.h"
@@ -41,4 +41,4 @@ class Commands: public QObject
                QMultiHash<QString, RS2::ActionType *> shortCommands;
 };
 
-#endif
+#endif // __COMMANDS_H__
similarity index 99%
rename from src/widgets/qg_actionhandler.cpp
rename to src/widgets/actionhandler.cpp
index f4a7b55f6f5bb884653525d7380f402980fa8919..e65a520f6cf8f9532741c2c3f444d7e83cb4a903 100644 (file)
@@ -1,4 +1,4 @@
-// qg_actionhandler.cpp
+// actionhandler.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -14,7 +14,7 @@
 // JLH  05/10/2010  Added this text. :-)
 //
 
-#include "qg_actionhandler.h"
+#include "actionhandler.h"
 
 #include "rs_commandevent.h"
 #include "commands.h"
similarity index 98%
rename from src/widgets/qg_actionhandler.h
rename to src/widgets/actionhandler.h
index ba86f020aa25900f9530f38c9082de40fab47d96..5d3792e7e5fbb19f1b4ce0ef34a447d607e0e58d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_ACTIONHANDLER_H
-#define QG_ACTIONHANDLER_H
+#ifndef __ACTIONHANDLER_H__
+#define __ACTIONHANDLER_H__
 
 #include <QtGui>
 #include "rs.h"
@@ -229,4 +229,4 @@ class QG_ActionHandler: public QObject
                QAction * lockRelativeZero;
 };
 
-#endif
+#endif // __ACTIONHANDLER_H__
similarity index 99%
rename from src/widgets/qg_blockwidget.cpp
rename to src/widgets/blockwidget.cpp
index 4be0f714a4f9d4ca068307dd3460a11a3df75c13..ff518bd7bc1616bd80109b047190241644621e92 100644 (file)
@@ -1,4 +1,4 @@
-// qg_blockwidget.cpp
+// blockwidget.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -14,9 +14,9 @@
 // JLH  05/10/2010  Added this text. :-)
 //
 
-#include "qg_blockwidget.h"
+#include "blockwidget.h"
 
-#include "qg_actionhandler.h"
+#include "actionhandler.h"
 #include "rs_block.h"
 #include "rs_blocklist.h"
 #include "rs_debug.h"
similarity index 86%
rename from src/widgets/qg_blockwidget.h
rename to src/widgets/blockwidget.h
index 701f5835f3d733305cd50a60092fe8f754ca4207..784df4ba2e463557e7579b51afb01f9b41e17c81 100644 (file)
@@ -1,10 +1,7 @@
-#ifndef QG_BLOCKWIDGET_H
-#define QG_BLOCKWIDGET_H
+#ifndef __BLOCKWIDGET_H__
+#define __BLOCKWIDGET_H__
 
 #include <QtGui>
-//#include "rs_blocklist.h"
-//#include "rs_blocklistlistener.h"
-//#include "qg_actionhandler.h"
 
 class RS_Block;
 class RS_BlockList;
@@ -14,7 +11,7 @@ class QG_ActionHandler;
  * This is the Qt implementation of a widget which can view a
  * block list.
  */
-class QG_BlockWidget: public QWidget//, public RS_BlockListListener
+class QG_BlockWidget: public QWidget
 {
     Q_OBJECT
 
@@ -64,4 +61,4 @@ class QG_BlockWidget: public QWidget//, public RS_BlockListListener
                QG_ActionHandler * actionHandler;
 };
 
-#endif
+#endif // __BLOCKWIDGET_H__
similarity index 99%
rename from src/widgets/qg_colorbox.cpp
rename to src/widgets/colorbox.cpp
index 2a703aea47c0ca196647f4d84ba87884d3bdf0c4..38a77805ce2954b67604597e6a65e6198015a425 100644 (file)
@@ -1,4 +1,4 @@
-// qg_colorbox.cpp
+// colorbox.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -14,7 +14,9 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "qg_colorbox.h"
+#include "colorbox.h"
+
+#include "rs.h"
 
 /**
  * Default Constructor. You must call init manually if you choose
similarity index 91%
rename from src/widgets/qg_colorbox.h
rename to src/widgets/colorbox.h
index be9d9f64375335c4ec482355f6c227edeb2b7140..a5e58b7fc19373aa1944b694fbaebaf38a2741a4 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_COLORBOX_H
-#define QG_COLORBOX_H
+#ifndef __COLORBOX_H__
+#define __COLORBOX_H__
 
 #include <QtGui>
 #include "rs_color.h"
@@ -36,4 +36,4 @@ class QG_ColorBox: public QComboBox
                bool unchanged;
 };
 
-#endif
+#endif // __COLORBOX_H__
similarity index 74%
rename from src/widgets/qg_commandedit.cpp
rename to src/widgets/commandedit.cpp
index f345f0f6da24ebd951c2f992fb574dc2b80381a8..95627ba2b292125afcc0234dc5c58c6fa5912877 100644 (file)
@@ -1,5 +1,20 @@
-
-#include "qg_commandedit.h"
+// commandedit.cpp
+//
+// Part of the Architektonas Project
+// Originally part of QCad Community Edition by Andrew Mustun
+// Extensively rewritten and refactored by James L. Hammons
+// Portions copyright (C) 2001-2003 RibbonSoft
+// Copyright (C) 2010 Underground Software
+// See the README and GPLv2 files for licensing and warranty information
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -----------------------------------------------------------
+// JLH  05/22/2010  Added this text. :-)
+//
+
+#include "commandedit.h"
 
 #include "rs_debug.h"
 
similarity index 88%
rename from src/widgets/qg_commandedit.h
rename to src/widgets/commandedit.h
index 5cc6287e3b19ef920024fdb54dc40d56eb5bb774..b72369dfe40010cf2fe3c61d331cfb3952c4a51c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_COMMANDEDIT_H
-#define QG_COMMANDEDIT_H
+#ifndef __COMMANDEDIT_H__
+#define __COMMANDEDIT_H__
 
 #include <QtGui>
 
@@ -33,4 +33,4 @@ class QG_CommandEdit: public QLineEdit
                bool acceptCoordinates;
 };
 
-#endif
+#endif // __COMMANDEDIT_H__
similarity index 99%
rename from src/widgets/qg_filedialog.cpp
rename to src/widgets/filedialog.cpp
index 7410e4388786bd3590b7710a424230826419d193..0ee35ddf6843dfb685fc752d51f1ea2ef88024c7 100644 (file)
@@ -1,4 +1,4 @@
-// qg_filedialog.cpp
+// filedialog.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  05/10/2010  Added this text. :-)
 //
 
-#include "qg_filedialog.h"
+#include "filedialog.h"
 
+#include "drawing.h"
 #include "qg_graphicview.h"
 #include "settings.h"
 #include "rs_system.h"
-#include "drawing.h"
 
 /**
  * Shows a dialog for choosing a file name. Saving the file is up to
similarity index 82%
rename from src/widgets/qg_filedialog.h
rename to src/widgets/filedialog.h
index c885341462df21bab5228edb808bf75f3417272c..33f3b186e7f619ee273819695f6434bcb7011ae1 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_FILEDIALOG_H
-#define QG_FILEDIALOG_H
+#ifndef __FILEDIALOG_H__
+#define __FILEDIALOG_H__
 
 #include <QtGui>
 #include "rs.h"
@@ -17,4 +17,4 @@ class QG_FileDialog
                static QString getSaveFileName(QWidget * parent, RS2::FormatType * type = NULL);
 };
 
-#endif
+#endif // __FILEDIALOG_H__
similarity index 98%
rename from src/widgets/qg_fontbox.cpp
rename to src/widgets/fontbox.cpp
index cea6551c61969b24b71bd8154786591b740ce5c9..8ea742b69f8fec5b1a1d9c6ea83efe1983c31b6c 100644 (file)
@@ -1,4 +1,4 @@
-// qg_fontbox.cpp
+// fontbox.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -14,7 +14,7 @@
 // JLH  05/10/2010  Added this text. :-)
 //
 
-#include "qg_fontbox.h"
+#include "fontbox.h"
 
 #include "rs_debug.h"
 #include "rs_font.h"
similarity index 86%
rename from src/widgets/qg_fontbox.h
rename to src/widgets/fontbox.h
index 6841f798c0c238e9505c04260689fad93a940494..e5eb61a43d81af0bf7c36e6398724d785f069fa0 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_FONTBOX_H
-#define QG_FONTBOX_H
+#ifndef __FONTBOX_H__
+#define __FONTBOX_H__
 
 #include <QtGui>
 
@@ -30,4 +30,4 @@ class QG_FontBox: public QComboBox
                RS_Font * currentFont;
 };
 
-#endif
+#endif // __FONTBOX_H__
similarity index 98%
rename from src/widgets/qg_layerbox.cpp
rename to src/widgets/layerbox.cpp
index 2da7e321962f91b15fd8e1290ff5eee6b8737527..d8a8797d35e74e6e07fa080d7204954c3b0eb4c1 100644 (file)
@@ -1,4 +1,4 @@
-// qg_layerbox.cpp
+// layerbox.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -14,7 +14,7 @@
 // JLH  05/11/2010  Added this text. :-)
 //
 
-#include "qg_layerbox.h"
+#include "layerbox.h"
 
 #include "rs_layer.h"
 #include "rs_layerlist.h"
similarity index 90%
rename from src/widgets/qg_layerbox.h
rename to src/widgets/layerbox.h
index f2662888811a503905c8afaf87c7e870b8c1e576..f4ebb8635df341ca8544ceccb27a12f3a80f349d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_LAYERBOX_H
-#define QG_LAYERBOX_H
+#ifndef __LAYERBOX_H__
+#define __LAYERBOX_H__
 
 #include <QtGui>
 
@@ -37,4 +37,4 @@ class QG_LayerBox: public QComboBox
                bool unchanged;
 };
 
-#endif
+#endif // __LAYERBOX_H__
similarity index 99%
rename from src/widgets/qg_layerwidget.cpp
rename to src/widgets/layerwidget.cpp
index bb422c050deb08ee083593860286a71ce7537a58..28e5f6ffefb8a59cbd61a007b871ce13112d3a09 100644 (file)
@@ -1,4 +1,4 @@
-// qg_layerwdget.cpp
+// layerwdget.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -14,9 +14,9 @@
 // JLH  05/11/2010  Added this text. :-)
 //
 
-#include "qg_layerwidget.h"
+#include "layerwidget.h"
 
-#include "qg_actionhandler.h"
+#include "actionhandler.h"
 #include "rs_debug.h"
 #include "rs_layer.h"
 #include "rs_layerlist.h"
similarity index 86%
rename from src/widgets/qg_layerwidget.h
rename to src/widgets/layerwidget.h
index bddf87e9ac3647d1a27c0467d08a7977f27a08c7..b9e4e5ac9f8b187db104f0b2692c32162f6cd5a5 100644 (file)
@@ -1,10 +1,7 @@
-#ifndef QG_LAYERWIDGET_H
-#define QG_LAYERWIDGET_H
+#ifndef __LAYERWIDGET_H__
+#define __LAYERWIDGET_H__
 
 #include <QtGui>
-//#include "rs_layerlist.h"
-//#include "rs_layerlistlistener.h"
-//#include "qg_actionhandler.h"
 
 class QG_ActionHandler;
 class RS_Layer;
@@ -14,7 +11,7 @@ class RS_LayerList;
  * This is the Qt implementation of a widget which can view a
  * layer list and provides a user interface for basic layer actions.
  */
-class QG_LayerWidget: public QWidget//, public RS_LayerListListener
+class QG_LayerWidget: public QWidget
 {
     Q_OBJECT
 
@@ -66,4 +63,4 @@ class QG_LayerWidget: public QWidget//, public RS_LayerListListener
                QG_ActionHandler * actionHandler;
 };
 
-#endif
+#endif // __LAYERWIDGET_H__
similarity index 99%
rename from src/widgets/qg_linetypebox.cpp
rename to src/widgets/linetypebox.cpp
index b180acfb847d961f188719b7e2947bd2f797906c..7240616095ae66772ed9f75d40bc0f4fbee74d78 100644 (file)
@@ -1,4 +1,4 @@
-// qg_linetypebox.cpp
+// linetypebox.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -14,7 +14,7 @@
 // JLH  05/11/2010  Added this text. :-)
 //
 
-#include "qg_linetypebox.h"
+#include "linetypebox.h"
 
 #include "rs_debug.h"
 
similarity index 90%
rename from src/widgets/qg_linetypebox.h
rename to src/widgets/linetypebox.h
index 287a9f3a748a0ca0de56928e2f110b7c80b3f231..e00ce0c208a3b3543d0a91576621b6325fac45e9 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_LINETYPEBOX_H
-#define QG_LINETYPEBOX_H
+#ifndef __LINETYPEBOX_H__
+#define __LINETYPEBOX_H__
 
 #include <QtGui>
 #include "rs.h"
@@ -35,4 +35,4 @@ class QG_LineTypeBox: public QComboBox
                bool unchanged;
 };
 
-#endif
+#endif // __LINETYPEBOX_H__
similarity index 77%
rename from src/widgets/qg_listviewitem.cpp
rename to src/widgets/listviewitem.cpp
index 4d01feb1c01518525972608311c0c248ad93f9c3..c9baaa29a0843b69c254ee86c0d1eedcc74b870d 100644 (file)
@@ -1,5 +1,20 @@
-
-#include "qg_listviewitem.h"
+// listviewitem.cpp
+//
+// Part of the Architektonas Project
+// Originally part of QCad Community Edition by Andrew Mustun
+// Extensively rewritten and refactored by James L. Hammons
+// Portions copyright (C) 2001-2003 RibbonSoft
+// Copyright (C) 2010 Underground Software
+// See the README and GPLv2 files for licensing and warranty information
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -----------------------------------------------------------
+// JLH  08/03/2010  Added this text. :-)
+//
+
+#include "listviewitem.h"
 
 #include <qpixmap.h>
 
@@ -14,7 +29,6 @@ QG_ListViewItem::QG_ListViewItem(QListWidget * par, const QString & label,
        this->id = id;
 
        setIcon(QIcon((open ? ":/res/folderopen.xpm" : ":/res/folderclosed.xpm")));
-
        setOpen(open);
 }
 
similarity index 89%
rename from src/widgets/qg_listviewitem.h
rename to src/widgets/listviewitem.h
index 334390dd4eb2d4cbec29dde4ca4fe8a3a84d6a42..87f6d6b7e875bf72aa2912c137dbd1fb7909ac65 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_LISTVIEWITEM_H
-#define QG_LISTVIEWITEM_H
+#ifndef __LISTVIEWITEM_H__
+#define __LISTVIEWITEM_H__
 
 #include <QtGui>
 
@@ -31,4 +31,4 @@ class QG_ListViewItem : public QListWidgetItem
                int id;
 };
 
-#endif
+#endif // __LISTVIEWITEM_H__
similarity index 97%
rename from src/widgets/qg_patternbox.cpp
rename to src/widgets/patternbox.cpp
index 8ee3242fc1f2a299c7cd1feb0090a2513d8e5b0a..0ce3a9e27ccf0b7176953bb4de73311e92fd8638 100644 (file)
@@ -1,4 +1,4 @@
-// qg_patternbox.cpp
+// patternbox.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -14,7 +14,7 @@
 // JLH  05/11/2010  Added this text. :-)
 //
 
-#include "qg_patternbox.h"
+#include "patternbox.h"
 
 #include "rs_pattern.h"
 #include "rs_patternlist.h"
similarity index 86%
rename from src/widgets/qg_patternbox.h
rename to src/widgets/patternbox.h
index 88fa461e60d6ba36a396043ecfee3c3c19aadab9..aeaf81985cb3c18f2bd50b01c5c85a908d7aa9ca 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_PATTERNBOX_H
-#define QG_PATTERNBOX_H
+#ifndef __PATTERNBOX_H__
+#define __PATTERNBOX_H__
 
 #include <QtGui>
 
@@ -30,4 +30,4 @@ class QG_PatternBox: public QComboBox
                RS_Pattern * currentPattern;
 };
 
-#endif
+#endif // __PATTERNBOX_H__
similarity index 96%
rename from src/widgets/qg_pentoolbar.cpp
rename to src/widgets/pentoolbar.cpp
index 426d9151f64fd2f69163e10b949db97998729114..87bfbe4c2b84d3892cb0213a47cce95039627f48 100644 (file)
@@ -1,4 +1,4 @@
-// qg_pentoolbar.cpp
+// pentoolbar.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 //                  delete created objects in destructor to prevent memory leak
 //
 
-#include "qg_pentoolbar.h"
+#include "pentoolbar.h"
 
-#include "qg_colorbox.h"
-#include "qg_widthbox.h"
-#include "qg_linetypebox.h"
+#include "colorbox.h"
+#include "widthbox.h"
+#include "linetypebox.h"
 #include "rs_layer.h"
 
 /**
similarity index 91%
rename from src/widgets/qg_pentoolbar.h
rename to src/widgets/pentoolbar.h
index 2b976e81bbf2d25ec2cbcaf19efe0fe254d0a34c..0a0fd5a99a13d9e9bae84b5062ea09190cd93580 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_PENTOOLBAR_H
-#define QG_PENTOOLBAR_H
+#ifndef __PENTOOLBAR_H__
+#define __PENTOOLBAR_H__
 
 #include <QtGui>
 //#include "rs_layerlistlistener.h"
@@ -42,4 +42,4 @@ class QG_PenToolBar: public QToolBar//, public RS_LayerListListener
                QG_LineTypeBox * lineTypeBox;
 };
 
-#endif
+#endif // __PENTOOLBAR_H__
index 9d4cf8c508c9774568357081ce3320afa251e7e6..6990d926a363aba2e8b1ec97cdba8ec35a30ec27 100644 (file)
@@ -3,8 +3,6 @@
 
 #include <QtGui>
 #include "graphicview.h"
-//#include "rs_layerlistlistener.h"
-//#include "rs_blocklistlistener.h"
 
 class RS_Document;
 class PaintInterface;
@@ -17,8 +15,7 @@ class RS_Preview;
  * Instances of this class can be linked to layer lists using
  * addLayerListListener().
  */
-class QG_GraphicView: public QWidget, public GraphicView//, //public Q3FilePreview,
-//     public RS_LayerListListener, public RS_BlockListListener
+class QG_GraphicView: public QWidget, public GraphicView//, public Q3FilePreview
 {
        Q_OBJECT
 
similarity index 83%
rename from src/widgets/qg_widthbox.cpp
rename to src/widgets/widthbox.cpp
index 43afbfbe34595b3d0ff53985333a997feba5faf4..da3336dda2d7da26db10ff8ba8b8413fc2da181b 100644 (file)
@@ -1,4 +1,4 @@
-// qg_widthbox.cpp
+// widthbox.cpp
 //
 // Originally part of QCad Community Edition by Andrew Mustun
 // Extensively rewritten and refactored by James L. Hammons
@@ -13,7 +13,7 @@
 // JLH  05/11/2010  Added this text. :-)
 //
 
-#include "qg_widthbox.h"
+#include "widthbox.h"
 
 #include "rs_debug.h"
 
@@ -59,40 +59,12 @@ void QG_WidthBox::init(bool showByLayer, bool showUnchanged)
        this->showUnchanged = showUnchanged;
 
        if (showUnchanged)
-//             addItem(QIcon(width00_xpm), tr("- Unchanged -"));
                addItem(QIcon(":/res/width00.xpm"), tr("- Unchanged -"));
 
        if (showByLayer)
-//             addItem(QIcon(width00_xpm), tr("By Layer"));
-//             addItem(QIcon(width00_xpm), tr("By Block"));
                addItem(QIcon(":/res/width00.xpm"), tr("By Layer"));
                addItem(QIcon(":/res/width00.xpm"), tr("By Block"));
 
-/*     addItem(QIcon(width01_xpm), tr("Default"));
-       addItem(QIcon(width01_xpm), tr("0.00mm"));
-       addItem(QIcon(width01_xpm), tr("0.05mm"));
-       addItem(QIcon(width01_xpm), tr("0.09mm"));
-       addItem(QIcon(width01_xpm), tr("0.13mm (ISO)"));
-       addItem(QIcon(width01_xpm), tr("0.15mm"));
-       addItem(QIcon(width01_xpm), tr("0.18mm (ISO)"));
-       addItem(QIcon(width01_xpm), tr("0.20mm"));
-       addItem(QIcon(width01_xpm), tr("0.25mm (ISO)"));
-       addItem(QIcon(width01_xpm), tr("0.30mm"));
-       addItem(QIcon(width03_xpm), tr("0.35mm (ISO)"));
-       addItem(QIcon(width03_xpm), tr("0.40mm"));
-       addItem(QIcon(width04_xpm), tr("0.50mm (ISO)"));
-       addItem(QIcon(width05_xpm), tr("0.53mm"));
-       addItem(QIcon(width05_xpm), tr("0.60mm"));
-       addItem(QIcon(width06_xpm), tr("0.70mm (ISO)"));
-       addItem(QIcon(width07_xpm), tr("0.80mm"));
-       addItem(QIcon(width08_xpm), tr("0.90mm"));
-       addItem(QIcon(width09_xpm), tr("1.00mm (ISO)"));
-       addItem(QIcon(width10_xpm), tr("1.06mm"));
-       addItem(QIcon(width10_xpm), tr("1.20mm"));
-       addItem(QIcon(width12_xpm), tr("1.40mm (ISO)"));
-       addItem(QIcon(width12_xpm), tr("1.58mm"));
-       addItem(QIcon(width12_xpm), tr("2.00mm (ISO)"));
-       addItem(QIcon(width12_xpm), tr("2.11mm"));*/
        addItem(QIcon(":/res/width01.xpm"), tr("Default"));
        addItem(QIcon(":/res/width01.xpm"), tr("0.00mm"));
        addItem(QIcon(":/res/width01.xpm"), tr("0.05mm"));
@@ -247,72 +219,58 @@ void QG_WidthBox::setLayerWidth(RS2::LineWidth w)
                {
                default:
                case RS2::Width00:
-//                     pixmap = QPixmap(width00_xpm);
                        pixmap = QPixmap(":/res/width00.xpm");
                        break;
                case RS2::Width01:
                case RS2::Width02:
-//                     pixmap = QPixmap(width01_xpm);
                        pixmap = QPixmap(":/res/width01.xpm");
                        break;
                case RS2::Width03:
                case RS2::Width04:
-//                     pixmap = QPixmap(width02_xpm);
                        pixmap = QPixmap(":/res/width02.xpm");
                        break;
                case RS2::Width05:
                case RS2::Width06:
-//                     pixmap = QPixmap(width03_xpm);
                        pixmap = QPixmap(":/res/width03.xpm");
                        break;
                case RS2::Width07:
                case RS2::Width08:
-//                     pixmap = QPixmap(width04_xpm);
                        pixmap = QPixmap(":/res/width04.xpm");
                        break;
                case RS2::Width09:
                case RS2::Width10:
-//                     pixmap = QPixmap(width05_xpm);
                        pixmap = QPixmap(":/res/width05.xpm");
                        break;
                case RS2::Width11:
                case RS2::Width12:
-//                     pixmap = QPixmap(width06_xpm);
                        pixmap = QPixmap(":/res/width06.xpm");
                        break;
                case RS2::Width13:
                case RS2::Width14:
-//                     pixmap = QPixmap(width07_xpm);
                        pixmap = QPixmap(":/res/width07.xpm");
                        break;
                case RS2::Width15:
                case RS2::Width16:
-//                     pixmap = QPixmap(width08_xpm);
                        pixmap = QPixmap(":/res/width08.xpm");
                        break;
                case RS2::Width17:
                case RS2::Width18:
-//                     pixmap = QPixmap(width09_xpm);
                        pixmap = QPixmap(":/res/width09.xpm");
                        break;
                case RS2::Width19:
                case RS2::Width20:
-//                     pixmap = QPixmap(width10_xpm);
                        pixmap = QPixmap(":/res/width10.xpm");
                        break;
                case RS2::Width21:
                case RS2::Width22:
-//                     pixmap = QPixmap(width11_xpm);
                        pixmap = QPixmap(":/res/width11.xpm");
                        break;
                case RS2::Width23:
                        //case RS2::Width24:
-//                     pixmap = QPixmap(width12_xpm);
                        pixmap = QPixmap(":/res/width12.xpm");
                        break;
                }
 
-//             changeItem(pixmap, tr("By Layer"), 0);
                setItemIcon(0, QIcon(pixmap));
                setItemText(0, tr("By Layer"));
 
similarity index 90%
rename from src/widgets/qg_widthbox.h
rename to src/widgets/widthbox.h
index b1c1444df0a3e8ee708cf0ab002654ed93bb466d..f7a9210fe00958449645684e21003f520ec072b1 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef QG_WIDTHBOX_H
-#define QG_WIDTHBOX_H
+#ifndef __WIDTHBOX_H__
+#define __WIDTHBOX_H__
 
 #include <QtGui>
 #include "rs.h"
@@ -35,4 +35,4 @@ class QG_WidthBox: public QComboBox
                bool unchanged;
 };
 
-#endif
+#endif // __WIDTHBOX_H__