1 /****************************************************************************
2 ** $Id: qg_layerwidget.h 1589 2004-07-14 21:28:54Z andrew $
4 ** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
6 ** This file is part of the qcadlib Library project.
8 ** This file may be distributed and/or modified under the terms of the
9 ** GNU General Public License version 2 as published by the Free Software
10 ** Foundation and appearing in the file LICENSE.GPL included in the
11 ** packaging of this file.
13 ** Licensees holding valid qcadlib Professional Edition licenses may use
14 ** this file in accordance with the qcadlib Commercial License
15 ** Agreement provided with the Software.
17 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 ** See http://www.ribbonsoft.com for further details.
22 ** Contact info@ribbonsoft.com if any conditions of this licensing are
25 **********************************************************************/
27 #ifndef QG_LAYERWIDGET_H
28 #define QG_LAYERWIDGET_H
31 #include "rs_layerlist.h"
32 #include "rs_layerlistlistener.h"
33 #include "qg_actionhandler.h"
36 * This is the Qt implementation of a widget which can view a
37 * layer list and provides a user interface for basic layer actions.
39 class QG_LayerWidget: public QWidget, public RS_LayerListListener
44 QG_LayerWidget(QG_ActionHandler * ah, QWidget * parent,
45 const char * name = 0, Qt::WindowFlags f = 0);
48 void setLayerList(RS_LayerList *, bool showByBlock);
50 void highlightLayer(RS_Layer *);
51 void highlightLayer(const QString &);
53 virtual void layerActivated(RS_Layer *);
54 virtual void layerAdded(RS_Layer *);
55 virtual void layerEdited(RS_Layer *);
56 virtual void layerRemoved(RS_Layer *);
57 virtual void layerToggled(RS_Layer *);
63 // void slotActivated(const QString & layerName);
64 void slotActivated(void);
65 // void slotMouseButtonClicked(int button, Q3ListBoxItem * item, const QPoint & pos);
66 void slotMouseButtonClicked(QListWidgetItem *);
69 void contextMenuEvent(QContextMenuEvent *);
70 virtual void keyPressEvent(QKeyEvent *);
73 RS_LayerList * layerList;
75 // Q3ListBox * listBox;
76 QListWidget * listBox;
78 QPixmap pxmLayerStatus00;
79 QPixmap pxmLayerStatus01;
80 QPixmap pxmLayerStatus10;
81 QPixmap pxmLayerStatus11;
87 QPixmap pxmDefreezeAll;
89 QG_ActionHandler * actionHandler;