outputview
outputjob.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef OUTPUTJOB_H
00021 #define OUTPUTJOB_H
00022
00023 #include <QPointer>
00024
00025 #include <interfaces/irun.h>
00026 #include <interfaces/irunprovider.h>
00027 #include <interfaces/iruncontroller.h>
00028
00029 #include <outputview/ioutputview.h>
00030 #include <outputview/outputviewexport.h>
00031
00032 class QStandardItemModel;
00033 class QItemDelegate;
00034
00035 namespace KDevelop
00036 {
00037
00038 class KDEVPLATFORMOUTPUTVIEW_EXPORT OutputJob : public KJob
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 OutputJob(QObject* parent = 0);
00044
00045 void startOutput();
00046
00047 void setRaiseOnCreation(bool raise);
00048
00049 protected:
00050 void setStandardToolView(IOutputView::StandardToolView standard);
00051 void setToolTitle(const QString& title);
00052 void setToolIcon(const KIcon& icon);
00054 void setTitle(const QString& title);
00055 void setViewType(IOutputView::ViewType type);
00056 void setBehaviours(IOutputView::Behaviours behaviours);
00057 void setKillJobOnOutputClose(bool killJobOnOutputClose);
00058
00059 QAbstractItemModel* model() const;
00060 void setModel(QAbstractItemModel* model, IOutputView::Ownership takeOwnership = IOutputView::KeepOwnership);
00061 void setDelegate(QAbstractItemDelegate* delegate, IOutputView::Ownership takeOwnership = IOutputView::KeepOwnership);
00062
00063 int outputId() const;
00064
00065 private Q_SLOTS:
00066 void outputViewRemoved(int , int id);
00067
00068 private:
00069 int m_standardToolView;
00070 QString m_title, m_toolTitle;
00071 KIcon m_toolIcon;
00072 IOutputView::ViewType m_type;
00073 IOutputView::Behaviours m_behaviours;
00074 bool m_killJobOnOutputClose;
00075 bool m_raiseOnCreation;
00076 int m_outputId;
00077 QAbstractItemModel* m_outputModel;
00078 IOutputView::Ownership m_modelOwnership;
00079 QAbstractItemDelegate* m_outputDelegate;
00080 IOutputView::Ownership m_delegateOwnership;
00081 };
00082
00083 }
00084
00085 #endif