Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Examples  

workspacetreeview.h

Go to the documentation of this file.
00001 
00002 //
00003 // YASA work space tree view declarations
00004 //
00005 // Project: Yasa 2
00006 // Author : Jan Blumenthal
00007 // Start  : 2002/02/28
00008 // $Header: /sources/yasa/yasagui/workspacetreeview.h,v 1.4 2003/01/24 15:47:44 bj Exp $
00009 //
00011 //
00012 // This program is free software; you can redistribute it and/or modify
00013 // it under the terms of the GNU General Public License as published by
00014 // the Free Software Foundation; either version 2 of the License, or
00015 // (at your option) any later version.
00016 //
00017 // This program is distributed in the hope that it will be useful,
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 // GNU General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU General Public License
00023 // along with this program (See the included file COPYING);
00024 // if not, write to the Free Software Foundation, Inc.,
00025 // 675 Mass Ave, Cambridge, MA 02139, USA.
00026 //
00028 #ifndef YASAGUI_WORKSPACETREE_VIEW_INCLUDE
00029 #define YASAGUI_WORKSPACETREE_VIEW_INCLUDE
00030 
00031 #include <yasagui/yasagui.h>
00032 #include <qobject.h>
00033 #include <qpopupmenu.h>
00034 #include "widgets.h"
00035 #include "parser.h"
00036 #include "workspace.h"
00037 #include "mainwindow.h"
00038 
00040 class YWorkSpaceManager;
00041 class YListViewItem;
00042 class YActionHandler;
00043 class YBackground;
00044 
00046 class YWorkSpaceTreeView : public YListView
00047 {
00048     Q_OBJECT
00049     YObject                 *oldselected;
00050 public:
00051                             YWorkSpaceTreeView(YSet *projectset, QFrame *frame) :
00052                             YListView(projectset, frame, QString::null),
00053                             oldselected(0)
00054                             {}
00055     virtual int             InitInstance();
00056     YListViewItem*          CreateTreeItem(YObject &object, QListViewItem *parent, QListViewItem *after);
00057 public slots:
00058     // from QListView
00059     void                    MouseButtonClicked(int, QListViewItem *,const QPoint &,int );
00060     void                    ItemActivated( QListViewItem *item);
00061 //  void                    LeftButtonClicked(QListViewItem *,const QPoint &,int );
00062     void                    RightButtonClicked(QListViewItem *,const QPoint &,int );
00063     void                    DoubleClicked(QListViewItem *);
00064     void                    keyPressEvent(QKeyEvent * e);
00065     void                    UpdateListView(YWorkSpace *workspace);
00066     void                    ClearListView(YWorkSpace *workspace);
00067 
00068     virtual void            NewChildObject(YObject *object);            
00069     virtual void            ChildObjectRemoved(YObject *object);        
00070 };
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00079 class YWorkSpaceTreeOutputParser : public YOutputParser, public QList<QListViewItem>
00080 {
00081     QListViewItem       *afterlistview;
00082     YWorkSpaceTreeView  &workspaceview;
00083     YWorkSpace          &workspace;
00084 public:                 YWorkSpaceTreeOutputParser(YWorkSpaceTreeView &view, YWorkSpace &ws) :
00085                         afterlistview(0),
00086                         workspaceview(view),
00087                         workspace(ws)
00088                         {}
00089     virtual int         WriteContentString(const CONFIG_STRING key, const QString &s)
00090                         {   return 0;
00091                             Q_CONSTUNUSED(key);
00092                             Q_CONSTUNUSED(s);
00093                         }
00094     virtual int         WriteContentInt(const CONFIG_STRING key, int value)
00095                         {
00096                             return 0;
00097                             Q_CONSTUNUSED(key);
00098                             Q_UNUSED(value);
00099                         }
00100     virtual int         WriteContentObject(const CONFIG_STRING key, const YDerivedObject &object)
00101                         {
00102                             return 0;
00103                             Q_CONSTUNUSED(key);
00104                             Q_CONSTUNUSED(object);
00105                         }
00106     virtual int         WriteContentState(const CONFIG_STRING key, bool state)
00107                         {
00108                             return 0;
00109                             Q_CONSTUNUSED(key);
00110                             Q_UNUSED(state);
00111                         }
00112     virtual int         NewSection(const CONFIG_STRING newsectionsetkey, YObject &yobject );
00113     virtual int         NewSectionSet(const CONFIG_STRING newsectionkey, YSet &yset );
00114     int                 Parse();
00115 };
00116 
00117 
00118 
00119 
00120 
00122 #endif                                                                  // ifndef YASAGUI_WORKSPACETREE_VIEW_INCLUDE

Generated on Thu Feb 13 23:43:57 2003 for Yasa by doxygen1.3-rc3