Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/projectView.h
Go to the documentation of this file.
00001 /*
00002  * projectView.h - declaration of project view
00003  *   and the model that manage files in project
00004  *
00005  * Copyright (C) 2014, Yodalee, lc85301@gmail.com
00006  *
00007  * This file is part of Qucs
00008  *
00009  * Qucs is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2, or (at your option)
00012  * any later version.
00013  *
00014  * This software is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with Qucs.  If not, see <http://www.gnu.org/licenses/>.
00021  *
00022  */
00023 
00024 #ifndef PROJECTVIEW_H_
00025 #define PROJECTVIEW_H_ value
00026 
00027 #include <QTreeView>
00028 #include <QString>
00029 
00030 #define APPEND_ROW(parent, data) \
00031 ({ \
00032   QList<QStandardItem*> c; \
00033   c.append(new QStandardItem(data)); \
00034   parent->appendRow(c); \
00035 })
00036 
00037 class QStandardItemModel;
00038 
00039 class ProjectView : public QTreeView
00040 {
00041   Q_OBJECT
00042 public:
00043   ProjectView (QWidget *parent);
00044   virtual ~ProjectView ();
00045 
00046   QStandardItemModel *model() { return m_model; };
00047 
00048   //data related
00049   void setProjPath(const QString &);
00050   void refresh();
00051   QStringList exportSchematic();
00052 private:
00053   QStandardItemModel *m_model;
00054 
00055   bool m_valid;
00056   QString m_projPath;
00057   QString m_projName;
00058 };
00059 
00060 #endif /* PROJECTVIEW_H_ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines