X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fwidgets%2Flayerwidget.cpp;h=447d4e7e1f991d1c98729c5ebde2e5ac3b8fc585;hb=1f0d096a7fc370ff02477f3860beae2669bf8903;hp=28e5f6ffefb8a59cbd61a007b871ce13112d3a09;hpb=e5a77a32dbe17d9534d3099f1fd3fdacba199516;p=architektonas diff --git a/src/widgets/layerwidget.cpp b/src/widgets/layerwidget.cpp index 28e5f6f..447d4e7 100644 --- a/src/widgets/layerwidget.cpp +++ b/src/widgets/layerwidget.cpp @@ -24,7 +24,7 @@ /** * Constructor. */ -QG_LayerWidget::QG_LayerWidget(QG_ActionHandler * ah, QWidget * parent, +LayerWidget::LayerWidget(ActionHandler * ah, QWidget * parent, const char * name, Qt::WindowFlags f): QWidget(parent, f), pxmLayerStatus00(":/res/layerstatus_00.xpm"), @@ -125,7 +125,7 @@ QG_LayerWidget::QG_LayerWidget(QG_ActionHandler * ah, QWidget * parent, /** * Destructor */ -QG_LayerWidget::~QG_LayerWidget() +LayerWidget::~LayerWidget() { delete listBox; //delete pxmVisible; @@ -139,7 +139,7 @@ QG_LayerWidget::~QG_LayerWidget() * it exists. * false: don't show special layer "ByBlock" */ -void QG_LayerWidget::setLayerList(RS_LayerList * layerList, bool showByBlock) +void LayerWidget::setLayerList(RS_LayerList * layerList, bool showByBlock) { this->layerList = layerList; this->showByBlock = showByBlock; @@ -149,9 +149,9 @@ void QG_LayerWidget::setLayerList(RS_LayerList * layerList, bool showByBlock) /** * Updates the layer box from the layers in the graphic. */ -void QG_LayerWidget::update() +void LayerWidget::update() { - RS_DEBUG->print("QG_LayerWidget::update() begin"); + RS_DEBUG->print("LayerWidget::update() begin"); #warning "!!!" // int yPos = listBox->contentsY(); @@ -161,17 +161,17 @@ void QG_LayerWidget::update() if (layerList != NULL) activeLayer = layerList->getActive(); - RS_DEBUG->print("QG_LayerWidget::update() clearing listBox"); + RS_DEBUG->print("LayerWidget::update() clearing listBox"); listBox->clear(); if (layerList == NULL) { - RS_DEBUG->print("QG_LayerWidget::update() abort"); + RS_DEBUG->print("LayerWidget::update() abort"); return; } - RS_DEBUG->print("QG_LayerWidget::update() filling in layers"); + RS_DEBUG->print("LayerWidget::update() filling in layers"); for(uint i=0; icount(); ++i) { @@ -213,12 +213,12 @@ void QG_LayerWidget::update() } } - RS_DEBUG->print("QG_LayerWidget::update() sorting"); + RS_DEBUG->print("LayerWidget::update() sorting"); // listBox->sort(); listBox->sortItems(Qt::AscendingOrder); - RS_DEBUG->print("QG_LayerWidget::update() reactivating current layer"); + RS_DEBUG->print("LayerWidget::update() reactivating current layer"); RS_Layer * l = lastLayer; highlightLayer(activeLayer); @@ -226,40 +226,40 @@ void QG_LayerWidget::update() #warning "!!!" // listBox->setContentsPos(0, yPos); - RS_DEBUG->print("QG_LayerWidget::update() end"); + RS_DEBUG->print("LayerWidget::update() end"); } /** * Highlights (activates) the given layer and makes it * the active layer in the layerlist. */ -void QG_LayerWidget::highlightLayer(RS_Layer * layer) +void LayerWidget::highlightLayer(RS_Layer * layer) { - RS_DEBUG->print("QG_LayerWidget::highlightLayer() begin"); + RS_DEBUG->print("LayerWidget::highlightLayer() begin"); if (layer == NULL || layerList == NULL) { - RS_DEBUG->print("QG_LayerWidget::highlightLayer() abort"); + RS_DEBUG->print("LayerWidget::highlightLayer() abort"); return; } QString name = layer->getName(); highlightLayer(name); - RS_DEBUG->print("QG_LayerWidget::highlightLayer() end"); + RS_DEBUG->print("LayerWidget::highlightLayer() end"); } /** * Highlights (activates) the given layer and makes it * the active layer in the layerlist. */ -void QG_LayerWidget::highlightLayer(const QString & name) +void LayerWidget::highlightLayer(const QString & name) { - RS_DEBUG->print("QG_LayerWidget::highlightLayer(name) begin"); + RS_DEBUG->print("LayerWidget::highlightLayer(name) begin"); if (layerList == NULL) { - RS_DEBUG->print("QG_LayerWidget::highlightLayer(name) abort"); + RS_DEBUG->print("LayerWidget::highlightLayer(name) abort"); return; } @@ -277,32 +277,32 @@ void QG_LayerWidget::highlightLayer(const QString & name) } } - RS_DEBUG->print("QG_LayerWidget::highlightLayer(name) end"); + RS_DEBUG->print("LayerWidget::highlightLayer(name) end"); } -/*virtual*/ void QG_LayerWidget::layerActivated(RS_Layer * layer) +/*virtual*/ void LayerWidget::layerActivated(RS_Layer * layer) { highlightLayer(layer); } -/*virtual*/ void QG_LayerWidget::layerAdded(RS_Layer * layer) +/*virtual*/ void LayerWidget::layerAdded(RS_Layer * layer) { update(); highlightLayer(layer); } -/*virtual*/ void QG_LayerWidget::layerEdited(RS_Layer *) +/*virtual*/ void LayerWidget::layerEdited(RS_Layer *) { update(); } -/*virtual*/ void QG_LayerWidget::layerRemoved(RS_Layer *) +/*virtual*/ void LayerWidget::layerRemoved(RS_Layer *) { update(); highlightLayer(layerList->at(0)); } -/*virtual*/ void QG_LayerWidget::layerToggled(RS_Layer *) +/*virtual*/ void LayerWidget::layerToggled(RS_Layer *) { update(); } @@ -310,11 +310,11 @@ void QG_LayerWidget::highlightLayer(const QString & name) /** * Called when the user activates (highlights) a layer. */ -//void QG_LayerWidget::slotActivated(const QString & layerName) -void QG_LayerWidget::slotActivated(void) +//void LayerWidget::slotActivated(const QString & layerName) +void LayerWidget::slotActivated(void) { QString layerName = listBox->currentItem()->text(); - RS_DEBUG->print("QG_LayerWidget::slotActivated(): %s", layerName.toLatin1().data()); + RS_DEBUG->print("LayerWidget::slotActivated(): %s", layerName.toLatin1().data()); if (layerList == NULL) return; @@ -326,10 +326,10 @@ void QG_LayerWidget::slotActivated(void) /** * Called for every mouse click. */ -//void QG_LayerWidget::slotMouseButtonClicked(int /*button*/, Q3ListBoxItem * item, const QPoint & pos) -void QG_LayerWidget::slotMouseButtonClicked(QListWidgetItem * item) +//void LayerWidget::slotMouseButtonClicked(int /*button*/, Q3ListBoxItem * item, const QPoint & pos) +void LayerWidget::slotMouseButtonClicked(QListWidgetItem * item) { - RS_DEBUG->print("QG_LayerWidget::slotMouseButtonClicked()"); + RS_DEBUG->print("LayerWidget::slotMouseButtonClicked()"); QPoint p = mapFromGlobal(QCursor::pos()); // only change state / no activation RS_Layer * l = lastLayer; @@ -354,7 +354,7 @@ void QG_LayerWidget::slotMouseButtonClicked(QListWidgetItem * item) /** * Shows a context menu for the layer widget. Launched with a right click. */ -void QG_LayerWidget::contextMenuEvent(QContextMenuEvent * e) +void LayerWidget::contextMenuEvent(QContextMenuEvent * e) { #warning "Needs porting to Qt4... !!! FIX !!!" #if 0 @@ -389,7 +389,7 @@ void QG_LayerWidget::contextMenuEvent(QContextMenuEvent * e) /** * Escape releases focus. */ -void QG_LayerWidget::keyPressEvent(QKeyEvent * e) +void LayerWidget::keyPressEvent(QKeyEvent * e) { switch (e->key()) {