From: Shamus Hammons Date: Mon, 29 Nov 2021 21:50:35 +0000 (-0600) Subject: Whitespace changes. :-P X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=architektonas;a=commitdiff_plain;h=742d2aa9bb46bce4f690474fa22f5980e175e55e Whitespace changes. :-P --- diff --git a/.gitignore b/.gitignore index 52b3102..be16d72 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ architektonas spline/ work/ .qmake.stash +ref/* +changes.txt diff --git a/README b/README index e402b44..fe1c624 100644 --- a/README +++ b/README @@ -78,4 +78,3 @@ typing: make && make install [*NOTE: make install doesn't do anything ATM] - diff --git a/cross-compile b/cross-compile index cbb56a3..28e4085 100755 --- a/cross-compile +++ b/cross-compile @@ -18,4 +18,3 @@ make clean && make rel=`git log -1 --pretty=format:%ci | cut -d ' ' -f 1 | tr -d -` #echo ${TARGET}.exe cd release && upx -9v ${TARGET}.exe && zip -9v ${TARGET}-${rel}.zip ${TARGET}.exe - diff --git a/src/about.cpp b/src/about.cpp index 7a8a210..78f33bb 100644 --- a/src/about.cpp +++ b/src/about.cpp @@ -19,7 +19,6 @@ #include "about.h" //testing... #include "structs.h" - AboutWindow::AboutWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog) { setWindowTitle(tr("About Architektonas...")); @@ -64,10 +63,8 @@ AboutWindow::AboutWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog) layout->addWidget(text); } - void AboutWindow::keyPressEvent(QKeyEvent * e) { if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Return) hide(); } - diff --git a/src/baseunittab.cpp b/src/baseunittab.cpp index 00bcc9b..930d0a1 100644 --- a/src/baseunittab.cpp +++ b/src/baseunittab.cpp @@ -14,7 +14,6 @@ #include "baseunittab.h" - BaseUnitTab::BaseUnitTab(QWidget * parent/*= 0*/): QWidget(parent) { unitInch = new QRadioButton(tr("Inches")); @@ -28,8 +27,6 @@ BaseUnitTab::BaseUnitTab(QWidget * parent/*= 0*/): QWidget(parent) setLayout(layout); } - BaseUnitTab::~BaseUnitTab() { } - diff --git a/src/blockitemwidget.cpp b/src/blockitemwidget.cpp index ea786f9..9a762bd 100644 --- a/src/blockitemwidget.cpp +++ b/src/blockitemwidget.cpp @@ -1,4 +1,5 @@ -// layeritemwidget.cpp: Layer item widget +// +// blockitemwidget.cpp: Block item widget // // Part of the Architektonas Project // (C) 2011 Underground Software @@ -13,7 +14,6 @@ #include "blockitemwidget.h" - BlockItemWidget::BlockItemWidget(QString s, QPixmap * i/*=0*/): QWidget(), name(new QLabel(s)), @@ -42,8 +42,6 @@ QSize size = mainLayout->sizeHint(); printf("BlockItemWidget: size. w=%i, h=%i\n", size.width(), size.height()); } - BlockItemWidget::~BlockItemWidget() { } - diff --git a/src/blockwidget.cpp b/src/blockwidget.cpp index d6965c9..3c16357 100644 --- a/src/blockwidget.cpp +++ b/src/blockwidget.cpp @@ -1,3 +1,4 @@ +// // blockwidget.cpp: Block add/remove/use widget // // Part of the Architektonas Project @@ -14,7 +15,6 @@ #include "blockwidget.h" #include "blockitemwidget.h" - BlockWidget::BlockWidget(void): QWidget() { BlockItemWidget * biw1 = new BlockItemWidget("2x4"); @@ -76,8 +76,6 @@ BlockWidget::BlockWidget(void): QWidget() setLayout(mainLayout); } - BlockWidget::~BlockWidget() { } - diff --git a/src/connection.cpp b/src/connection.cpp index 8e12234..f1ab384 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -14,29 +14,24 @@ #include "connection.h" - Connection::Connection(Object * o/*= NULL*/, double param/*= 0*/) { object = o; t = param; } - Connection::~Connection() { } - // Check for equality bool Connection::operator==(Connection const c) { return (object == c.object) && (t == c.t); } - // Check for inequality bool Connection::operator!=(Connection const c) { return (object != c.object) || (t != c.t); } - diff --git a/src/container.cpp b/src/container.cpp index 9c3d403..b3f7347 100644 --- a/src/container.cpp +++ b/src/container.cpp @@ -1,3 +1,4 @@ +// // container.cpp: Container object // // Part of the Architektonas Project @@ -19,7 +20,6 @@ #include "dimension.h" #include "painter.h" - Container::Container(Vector p1, Object * p/*= NULL*/): Object(p1, p), isTopLevelContainer(false), dragging(false), draggingHandle1(false), draggingHandle2(false), @@ -29,7 +29,6 @@ Container::Container(Vector p1, Object * p/*= NULL*/): Object(p1, p), state = OSInactive; } - // Copy constructor Container::Container(const Container & copy): Object(copy.position, copy.parent) { @@ -39,13 +38,11 @@ Container::Container(const Container & copy): Object(copy.position, copy.parent) state = OSInactive; } - Container::~Container() { Clear(); } - // Assignment operator Container & Container::operator=(const Container & from) { @@ -66,7 +63,6 @@ printf("Container: Copying object $%08X...\n", *i); return *this; } - /*virtual*/ void Container::Draw(Painter * painter) { QRectF boundary; @@ -91,13 +87,11 @@ printf("Container: Copying object $%08X...\n", *i); } } - /*virtual*/ Vector Container::Center(void) { return position; } - /* We need at least *three* handles for this object: - one for moving @@ -111,7 +105,6 @@ I click here and drag there?" Also: should put the snap logic into the Object base class (as a static method)... */ - // Need to add checking here for clicking on a member of a group (Container), // and checking for if it's a top level container (the DrawingView's document). /* @@ -272,7 +265,6 @@ class so that we can leverage that stuff here as well. return (lastObjectHovered == NULL ? false : true); } - /*virtual*/ void Container::PointerReleased(void) { if (!isTopLevelContainer) @@ -303,7 +295,6 @@ have to worry about keeping track of old states... (*i)->PointerReleased(); } - /*virtual*/ bool Container::NeedsUpdate(void) { // If this is *not* a top level container, then we treat it as an @@ -324,14 +315,12 @@ have to worry about keeping track of old states... return false; } - /*virtual*/ void Container::Add(Object * object) { objects.push_back(object); printf("Container: Added object (=$%X). size = %li\n", object, objects.size()); } - /*virtual*/ QRectF Container::Extents(void) { QRectF bounds; @@ -342,7 +331,6 @@ printf("Container: Added object (=$%X). size = %li\n", object, objects.size()); return bounds; } - void Container::Delete(Object * objectToDelete) { std::vector::iterator i = objects.begin(); @@ -360,7 +348,6 @@ void Container::Delete(Object * objectToDelete) } } - void Container::DeleteSelectedItems(void) { std::vector::iterator i = objects.begin(); @@ -377,7 +364,6 @@ void Container::DeleteSelectedItems(void) } } - void Container::Clear(void) { std::vector::iterator i = objects.begin(); @@ -390,21 +376,18 @@ printf("Container: Deleting object ($%X)...\n", *i); } } - void Container::SelectAll(void) { for(unsigned int i=0; istate = OSSelected; } - void Container::DeselectAll(void) { for(unsigned int i=0; istate = OSInactive; } - int Container::ItemsSelected(void) { int selected = 0; @@ -416,7 +399,6 @@ int Container::ItemsSelected(void) return selected; } - Object * Container::SelectedItem(unsigned int index) { unsigned int selectedIndex = 0; @@ -435,7 +417,6 @@ Object * Container::SelectedItem(unsigned int index) return NULL; } - void Container::MoveContentsTo(Container * newContainer) { // Sanity check @@ -453,7 +434,6 @@ void Container::MoveContentsTo(Container * newContainer) objects.clear(); } - void Container::CopyContentsTo(Container * newContainer) { // Sanity check @@ -465,7 +445,6 @@ void Container::CopyContentsTo(Container * newContainer) newContainer->Add((*i)->Copy()); } - void Container::MoveSelectedContentsTo(Container * newContainer) { // Sanity check @@ -487,7 +466,6 @@ void Container::MoveSelectedContentsTo(Container * newContainer) } } - void Container::CopySelectedContentsTo(Container * newContainer) { // Sanity check @@ -502,7 +480,6 @@ void Container::CopySelectedContentsTo(Container * newContainer) } } - void Container::ResizeAllDimensions(double newSize) { for(std::vector::iterator i=objects.begin(); i!=objects.end(); i++) @@ -514,7 +491,6 @@ void Container::ResizeAllDimensions(double newSize) } } - /*virtual*/ void Container::Enumerate(FILE * file) { // Only put "CONTAINER" markers if *not* the top level container @@ -530,7 +506,6 @@ void Container::ResizeAllDimensions(double newSize) fprintf(file, "ENDCONTAINER\n"); } - /*virtual*/ Object * Container::Copy(void) { #warning "!!! This doesn't take care of attached Dimensions !!!" @@ -548,14 +523,12 @@ same reference number. return c; } - /*virtual*/ void Container::Rotate(Point point, double angle) { for(std::vector::iterator i=objects.begin(); i!=objects.end(); i++) (*i)->Rotate(point, angle); } - /*virtual*/ void Container::RotateSelected(Point point, double angle) { for(std::vector::iterator i=objects.begin(); i!=objects.end(); i++) @@ -565,14 +538,12 @@ same reference number. } } - /*virtual*/ void Container::Mirror(Point p1, Point p2) { for(std::vector::iterator i=objects.begin(); i!=objects.end(); i++) (*i)->Mirror(p1, p2); } - /*virtual*/ void Container::MirrorSelected(Point p1, Point p2) { for(std::vector::iterator i=objects.begin(); i!=objects.end(); i++) @@ -582,7 +553,6 @@ same reference number. } } - /*virtual*/ void Container::Save(void) { Object::Save(); @@ -591,7 +561,6 @@ same reference number. (*i)->Save(); } - /*virtual*/ void Container::Restore(void) { Object::Restore(); @@ -599,4 +568,3 @@ same reference number. for(std::vector::iterator i=objects.begin(); i!=objects.end(); i++) (*i)->Restore(); } - diff --git a/src/fileio.cpp b/src/fileio.cpp index 5391162..1b11902 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -61,7 +61,7 @@ Connect() function. Or, instead of a point, a parameter value? Doing that, with the Line and a parameter "t", if t == 0 we have endpoint 1. if t == 1, then we have endpoint 2. With a Circle, the parameter is a number -between 0 and 1 (scaled to 0 to 2π). With an Arc, the parameter goes from 0 to +between 0 and 1 (scaled to 0 to tau). With an Arc, the parameter goes from 0 to 1, 0 being enpoint 1 and 1 being endpoint 2. How does this work for moving objects that are connected? Again, with the Line @@ -115,11 +115,9 @@ OTHER CONSIDERATIONS: // OTFDimension, OTFPolygon, OTFText, OTFImage, OTFBlock, OTFEndOfFile }; enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFObject, OTFEndOfFile }; - // Instantiate class variables /*static*/ int FileIO::objectFileType = OTFObject; - /*static*/ bool FileIO::SaveAtnsFile(FILE * file, Container * c) { /* Approach: loop through the container, doing a depth-first traversal. Any @@ -140,7 +138,6 @@ enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFObject, OTFEndOfFile }; return true; } - /*static*/ bool FileIO::LoadAtnsFile(FILE * file, Container * drawing) { float version; @@ -163,7 +160,6 @@ enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFObject, OTFEndOfFile }; return false; } - /*static*/ void FileIO::ResetLayerVectors(void) { // Set up layer vectors @@ -174,7 +170,6 @@ enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFObject, OTFEndOfFile }; Global::activeLayer = 0; } - /*static*/ bool FileIO::LoadVersion1_0(FILE * file, Container * drawing) { // Approach: read each object in the file, one by one. If the object is a @@ -222,7 +217,6 @@ enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFObject, OTFEndOfFile }; return false; } - /*static*/ bool FileIO::LoadVersion1_1(FILE * file, Container * drawing) { // Approach: read each object in the file, one by one. If the object is a @@ -276,7 +270,6 @@ enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFObject, OTFEndOfFile }; return false; } - /*static*/ bool FileIO::LoadVersion1_2(FILE * file, Container * drawing) { int hidden, locked; @@ -345,7 +338,6 @@ enum ObjectTypeFile { OTFContainer, OTFContainerEnd, OTFObject, OTFEndOfFile }; return false; } - /*static*/ Object * FileIO::GetObjectFromFile(FILE * file, bool extended/*= false*/, bool ext2/*= false*/) { char buffer[256]; @@ -452,7 +444,6 @@ if (errno) return obj; } - /*static*/ bool FileIO::WriteObjectToFile(FILE * file, Object * obj) { // Sanity check @@ -509,4 +500,3 @@ if (errno) return true; } - diff --git a/src/fileio.h b/src/fileio.h index 84755a0..b61bc33 100644 --- a/src/fileio.h +++ b/src/fileio.h @@ -26,4 +26,3 @@ class FileIO }; #endif // __FILEIO_H__ - diff --git a/src/generaltab.cpp b/src/generaltab.cpp index 48a9ffd..48597e6 100644 --- a/src/generaltab.cpp +++ b/src/generaltab.cpp @@ -14,7 +14,6 @@ #include "generaltab.h" - GeneralTab::GeneralTab(QWidget * parent/*= 0*/): QWidget(parent) { antialiasChk = new QCheckBox(tr("Use Qt's built-in antialiasing")); @@ -24,7 +23,6 @@ GeneralTab::GeneralTab(QWidget * parent/*= 0*/): QWidget(parent) setLayout(layout); } - GeneralTab::~GeneralTab() { } diff --git a/src/global.h b/src/global.h index 3a18272..796cc45 100644 --- a/src/global.h +++ b/src/global.h @@ -67,4 +67,3 @@ class Global }; #endif // __GLOBALS_H__ - diff --git a/src/layeritemwidget.cpp b/src/layeritemwidget.cpp index f86017b..0dbb1de 100644 --- a/src/layeritemwidget.cpp +++ b/src/layeritemwidget.cpp @@ -1,3 +1,4 @@ +// // layeritemwidget.cpp: Layer item widget // // Part of the Architektonas Project @@ -13,7 +14,6 @@ #include "layeritemwidget.h" - LayerItemWidget::LayerItemWidget(QString s, bool i/*=false*/, bool l/*=false*/, QListWidgetItem * p/*=null*/): QWidget(), name(new QLabel(s)), @@ -53,22 +53,18 @@ LayerItemWidget::LayerItemWidget(QString s, bool i/*=false*/, bool l/*=false*/, connect(locked, SIGNAL(clicked(bool)), this, SLOT(HandleLockToggle(bool))); } - LayerItemWidget::~LayerItemWidget() { } - void LayerItemWidget::HandleHideToggle(bool state) { // printf("Eye is: %s\n", !state ? "OPEN" : "closed"); emit HideToggled(parent, state); } - void LayerItemWidget::HandleLockToggle(bool state) { // printf("Lock is: %s\n", !state ? "OPEN" : "closed"); emit LockToggled(parent, state); } - diff --git a/src/layerwidget.cpp b/src/layerwidget.cpp index 4c9dd93..1ab9d79 100644 --- a/src/layerwidget.cpp +++ b/src/layerwidget.cpp @@ -1,3 +1,4 @@ +// // layerwidget.cpp: Layer add/remove/use widget // // Part of the Architektonas Project @@ -15,7 +16,6 @@ #include "global.h" #include "layeritemwidget.h" - LayerWidget::LayerWidget(void): QWidget(), addLayer(new QToolButton), removeLayer(new QToolButton), editLayer(new QToolButton), layerUp(new QToolButton), @@ -75,12 +75,10 @@ LayerWidget::LayerWidget(void): QWidget(), Global::layerName.push_back("Background"); } - LayerWidget::~LayerWidget() { } - void LayerWidget::Reload(void) { list->clear(); @@ -102,7 +100,6 @@ void LayerWidget::Reload(void) SetButtonStates(); } - void LayerWidget::HandleLayerSelected(int currentRow) { // If LayerWidget is empty, bail out @@ -123,7 +120,6 @@ void LayerWidget::HandleLayerSelected(int currentRow) SetButtonStates(); } - // // What happens here is that for every QListWidgetItem we make, we connect it // to these handlers. But we only have to worry about that when adding and @@ -142,7 +138,6 @@ void LayerWidget::HandleHideToggle(QListWidgetItem * qlwi, bool state) emit LayerToggled(); } - void LayerWidget::HandleLockToggle(QListWidgetItem * qlwi, bool state) { int currentRow = list->row(qlwi); @@ -152,13 +147,11 @@ void LayerWidget::HandleLockToggle(QListWidgetItem * qlwi, bool state) // printf("Item #%i, new lock state is %s\n", list->row(qlwi), (state ? "ON" : "off")); } - void LayerWidget::HandleDblClick(QListWidgetItem * /*qlwi*/) { EditLayer(); } - void LayerWidget::AddLayer(void) { // We always stick the newest layer at the top of the list (visually, the @@ -183,7 +176,6 @@ void LayerWidget::AddLayer(void) Global::numLayers++; } - void LayerWidget::DeleteLayer(void) { int numItems = list->count(); @@ -217,7 +209,6 @@ void LayerWidget::DeleteLayer(void) Global::activeLayer--; } - void LayerWidget::EditLayer(void) { // Get the LayerItemWidget so we can edit it (its name, anyway)... @@ -240,7 +231,6 @@ void LayerWidget::EditLayer(void) } } - void LayerWidget::MoveLayerUp(void) { // Get information out of the LayerItemWidget (& get it from the list!) @@ -279,7 +269,6 @@ void LayerWidget::MoveLayerUp(void) emit LayersSwapped(layer, layer + 1); } - void LayerWidget::MoveLayerDown(void) { // Get information out of the LayerItemWidget (& get it from the list!) @@ -318,7 +307,6 @@ void LayerWidget::MoveLayerDown(void) emit LayersSwapped(layer, layer - 1); } - // // Set button states in this widget to sane values // @@ -331,4 +319,3 @@ void LayerWidget::SetButtonStates(void) layerUp->setEnabled(currentRow == 0 ? false : true); removeLayer->setEnabled(numItems == 1 ? false : true); } - diff --git a/src/layerwidget.h b/src/layerwidget.h index 5da5ee9..34159a7 100644 --- a/src/layerwidget.h +++ b/src/layerwidget.h @@ -46,4 +46,3 @@ class LayerWidget: public QWidget }; #endif // __LAYERWIDGET_H__ - diff --git a/src/main.cpp b/src/main.cpp index 7a2e392..960cee9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,6 @@ Architektonas::Architektonas(int & argc, char * argv[]): QApplication(argc, argv mainWindow->show(); } - // Here's the main application loop--short and simple... int main(int argc, char * argv[]) { diff --git a/src/mathconstants.h b/src/mathconstants.h index 010dd18..2385861 100644 --- a/src/mathconstants.h +++ b/src/mathconstants.h @@ -1,3 +1,4 @@ +// // Mathematical Constants used by Architektonas // // Part of the Architektonas Project @@ -26,4 +27,3 @@ #define HALF_TAU (TAU_2QTR) #define QTR_TAU (TAU_1QTR) #define THREE_QTR_TAU (TAU_3QTR) - diff --git a/src/objectwidget.cpp b/src/objectwidget.cpp index 915e103..f31e4f5 100644 --- a/src/objectwidget.cpp +++ b/src/objectwidget.cpp @@ -1,3 +1,4 @@ +// // objectwidget.cpp: Object tweaking widget // // Part of the Architektonas Project @@ -14,7 +15,6 @@ #include "objectwidget.h" #include "mathconstants.h" - ObjectWidget::ObjectWidget(void): QWidget() { label = new QLabel; @@ -49,12 +49,10 @@ ObjectWidget::ObjectWidget(void): QWidget() setLayout(mainLayout); } - ObjectWidget::~ObjectWidget() { } - void ObjectWidget::ShowInfo(Object * obj) { // Sanity check @@ -112,4 +110,3 @@ void ObjectWidget::ShowInfo(Object * obj) label->setText(s); } - diff --git a/src/objectwidget.h b/src/objectwidget.h index 31b7be8..5d57679 100644 --- a/src/objectwidget.h +++ b/src/objectwidget.h @@ -4,7 +4,6 @@ #include #include "structs.h" - class ObjectWidget: public QWidget { Q_OBJECT @@ -21,4 +20,3 @@ class ObjectWidget: public QWidget }; #endif // __OBJECTWIDGET_H__ - diff --git a/src/penwidget.cpp b/src/penwidget.cpp index 9b80932..a20c0a2 100644 --- a/src/penwidget.cpp +++ b/src/penwidget.cpp @@ -1,3 +1,4 @@ +// // penwidget.cpp: Pen tweaking widget // // Part of the Architektonas Project diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index 442fba8..fd3452d 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -15,7 +15,6 @@ #include "baseunittab.h" #include "generaltab.h" - SettingsDialog::SettingsDialog(QWidget * parent/*= 0*/): QDialog(parent) { tabWidget = new QTabWidget; @@ -39,8 +38,6 @@ SettingsDialog::SettingsDialog(QWidget * parent/*= 0*/): QDialog(parent) setWindowTitle(tr("Architektonas Settings")); } - SettingsDialog::~SettingsDialog() { } - diff --git a/src/utils.cpp b/src/utils.cpp index 7428fbe..53f5c73 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1,3 +1,4 @@ +// // utils.cpp: Stuff that's useful to have kicking around, in one spot // // Part of the Architektonas Project