/**
* 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"),
/**
* Destructor
*/
-QG_LayerWidget::~QG_LayerWidget()
+LayerWidget::~LayerWidget()
{
delete listBox;
//delete pxmVisible;
* 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;
/**
* 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();
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; i<layerList->count(); ++i)
{
}
}
- 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);
#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;
}
}
}
- 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();
}
/**
* 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;
/**
* 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;
/**
* 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
/**
* Escape releases focus.
*/
-void QG_LayerWidget::keyPressEvent(QKeyEvent * e)
+void LayerWidget::keyPressEvent(QKeyEvent * e)
{
switch (e->key())
{