00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2004-2006 Trolltech AS. All rights reserved. 00004 ** 00005 ** This file is part of the example classes of the Qt Toolkit. 00006 ** 00007 ** This file may be used under the terms of the GNU General Public 00008 ** License version 2.0 as published by the Free Software Foundation 00009 ** and appearing in the file LICENSE.GPL included in the packaging of 00010 ** this file. Please review the following information to ensure GNU 00011 ** General Public Licensing requirements will be met: 00012 ** http://www.trolltech.com/products/qt/opensource.html 00013 ** 00014 ** If you are unsure which license is appropriate for your use, please 00015 ** review the following information: 00016 ** http://www.trolltech.com/products/qt/licensing.html or contact the 00017 ** sales department at sales@trolltech.com. 00018 ** 00019 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00020 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00021 ** 00022 ****************************************************************************/ 00023 00032 #ifndef CONDORQVIEW_H 00033 #define CONDORQVIEW_H 00034 00035 #include <QDebug> 00036 #include <QTreeView> 00037 #include <QContextMenuEvent> 00038 #include <QStandardItemModel> 00039 #include <QSortFilterProxyModel> 00040 #include <QItemSelectionModel> 00041 #include <QModelIndex> 00042 #include <QMenu> 00043 #include <QAction> 00044 #include <QInputDialog> 00045 #include <QHeaderView> 00046 #include <QDialog> 00047 00048 #include "condorabstractview.h" 00049 #include "submitdialog.h" 00050 #include "priodialog.h" 00051 #include "rmdialog.h" 00052 #include "holddialog.h" 00053 #include "rmdialog.h" 00054 #include "qeditdialog.h" 00055 #include "releasedialog.h" 00056 00057 00058 class CondorQView : public CondorAbstractView 00059 { 00060 Q_OBJECT 00061 public: 00063 setClassname1("qview",CondorAbstractView); 00064 CondorQView(); 00065 CondorQView(QStandardItemModel *, QStringList, QStringList); 00066 ~CondorQView(); 00067 static bool isInstanceOf(CondorAbstractView *); 00068 00069 private: 00071 QAction *m_holdAct; 00073 QAction *m_qeditAct; 00075 QAction *m_prioAct; 00077 QAction *m_rmAct; 00079 QAction *m_submitAct; 00081 QAction *m_releaseAct; 00083 QStringList m_others; 00084 00085 private slots: 00086 void createActions(); 00087 void holdDialog(); 00088 void qeditDialog(); 00089 void prioDialog(); 00090 void rmDialog(); 00091 void submitDialog(); 00092 void releaseDialog(); 00093 void changeModel(); 00094 void selectItem(const QModelIndex &); 00095 00096 protected: 00097 void contextMenuEvent ( QContextMenuEvent * e ); 00098 00099 private: 00100 void readSettings(); 00101 void writeSettings(); 00102 00103 }; 00104 00105 #endif