1 /****************************************************************************
2 ** $Id: qg_blockwidget.h 1563 2004-04-04 22:51: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_BLOCKWIDGET_H
28 #define QG_BLOCKWIDGET_H
31 #include "rs_blocklist.h"
32 #include "rs_blocklistlistener.h"
33 #include "qg_actionhandler.h"
36 * This is the Qt implementation of a widget which can view a
39 class QG_BlockWidget: public QWidget, public RS_BlockListListener
44 QG_BlockWidget(QG_ActionHandler * ah, QWidget * parent,
45 const char * name = 0, Qt::WFlags f = 0);
48 void setBlockList(RS_BlockList * blockList);
49 RS_BlockList * getBlockList();
51 void highlightBlock(RS_Block * block);
53 virtual void blockAdded(RS_Block *);
54 virtual void blockEdited(RS_Block *);
55 virtual void blockRemoved(RS_Block *);
56 virtual void blockToggled(RS_Block *);
62 //void slotToggleView(QListBoxItem* item);
63 // void slotActivated(const QString & blockName);
64 void slotActivated(void);
65 // void slotMouseButtonClicked(int button, Q3ListBoxItem * item, const QPoint & pos);
66 void slotMouseButtonClicked(QListWidgetItem * item);
69 void contextMenuEvent(QContextMenuEvent * e);
70 virtual void keyPressEvent(QKeyEvent * e);
73 RS_BlockList * blockList;
74 // Q3ListBox * listBox;
75 QListWidget * listBox;
81 QPixmap pxmAttributes;
84 QPixmap pxmDefreezeAll;
86 QG_ActionHandler * actionHandler;