SceneInspector.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2008 Werner Mayer <wmayer[at]users.sourceforge.net>     *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 #ifndef GUI_SCENEINSPECTOR_H
00024 #define GUI_SCENEINSPECTOR_H
00025 
00026 #include <QStandardItemModel>
00027 #include <QDialog>
00028 
00029 class SoNode;
00030 
00031 namespace Gui {
00032 namespace Dialog {
00033 
00034 class Ui_SceneInspector;
00035 
00037 class SceneModel : public QStandardItemModel
00038 {
00039     Q_OBJECT
00040 
00041 public:
00042     SceneModel(QObject* parent);
00043     virtual ~SceneModel();
00044 
00046     int columnCount (const QModelIndex & parent = QModelIndex()) const;
00051     QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
00053     bool setHeaderData (int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole);
00055     void setNode(SoNode* node);
00057     Qt::ItemFlags flags (const QModelIndex & index) const;
00058 
00059 private:
00060     void setNode(QModelIndex, SoNode*);
00061 };
00062 
00064 class DlgInspector : public QDialog
00065 {
00066     Q_OBJECT
00067 
00068 public:
00069     DlgInspector(QWidget* parent = 0, Qt::WFlags fl = 0);
00070     ~DlgInspector();
00071 
00072     void setNode(SoNode* node);
00073 
00074 private Q_SLOTS:
00075     void on_refreshButton_clicked();
00076 
00077 protected:
00078     void changeEvent(QEvent *e);
00079 
00080 private:
00081     Ui_SceneInspector* ui;
00082 };
00083 
00084 } // namespace Dialog
00085 } // namespace Gui
00086 
00087 #endif // GUI_SCENEINSPECTOR_H

Generated on Wed Nov 23 19:00:36 2011 for FreeCAD by  doxygen 1.6.1