File indexing completed on 2024-12-22 04:17:34
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2007 The University of Toronto * 0004 * netterfield@astro.utoronto.ca * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 ***************************************************************************/ 0012 0013 #ifndef LAYOUTBOXITEM_H 0014 #define LAYOUTBOXITEM_H 0015 0016 #include "viewitem.h" 0017 #include "graphicsfactory.h" 0018 0019 namespace Kst { 0020 0021 class LayoutBoxItem : public ViewItem 0022 { 0023 Q_OBJECT 0024 public: 0025 explicit LayoutBoxItem(View *parent); 0026 virtual ~LayoutBoxItem(); 0027 0028 const QString defaultsGroupName() const {return QString("layoutbox");} 0029 0030 void appendItem(ViewItem *item); 0031 0032 virtual void save(QXmlStreamWriter &xml); 0033 0034 public Q_SLOTS: 0035 void setEnabled(bool enabled); 0036 0037 protected: 0038 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event); 0039 virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); 0040 }; 0041 0042 class LayoutBoxItemFactory : public GraphicsFactory { 0043 public: 0044 LayoutBoxItemFactory(); 0045 ~LayoutBoxItemFactory(); 0046 ViewItem* generateGraphics(QXmlStreamReader& stream, ObjectStore *store, View *view, ViewItem *parent = 0); 0047 }; 0048 0049 } 0050 0051 #endif 0052 0053 // vim: ts=2 sw=2 et