X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flayerwidget.cpp;fp=src%2Flayerwidget.cpp;h=1ab9d79f22ec815e80de126bc84fffe29d7d9a2f;hb=742d2aa9bb46bce4f690474fa22f5980e175e55e;hp=4c9dd93ff73db823c0621daca42d6103b7b19636;hpb=1d17841ed1d003060250dc2ef8dd6785fa02a07f;p=architektonas 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); } -