00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00028
00029 #define YASAGUI_SOURCESVIEW_INCLUDE
00030
00031
00033 #include <qtextbrowser.h>
00034 #include "yasagui/yasagui.h"
00035 #include "config.h"
00036 #include "mainwindow.h"
00037 #include "sources.h"
00038
00039
00043 class YFileViewFrame : public YObjectFrame
00044 { Q_OBJECT
00045 protected:
00046 QTextBrowser textbrowser;
00047 public: YFileViewFrame(QWidget *parent, YFrameArgs &args) :
00048 YObjectFrame(args),
00049 textbrowser(parent)
00050 {}
00051 virtual int InitInstance();
00052 virtual QWidget* GetMainWidget() { return &textbrowser; }
00053 virtual void SetBackdrop()=0;
00054 virtual YFilePath* GetFilePath() const=0;
00055 };
00056
00060 class YSourceViewFrame : public YFileViewFrame
00061 { public: YSourceViewFrame(QWidget *parent, YFrameArgs &args) :
00062 YFileViewFrame(parent, args) {}
00063 static YFrame* CreateSourceViewFrame(QWidget *parent, YFrameArgs &args)
00064 { return new YSourceViewFrame( parent, args); }
00065 virtual void SetBackdrop();
00066 virtual YFilePath* GetFilePath() const { return (YFilePath*)GetObject(); }
00067 };
00068
00069
00070
00073 class YLogFileViewFrame : public YFileViewFrame
00074 { public: YLogFileViewFrame(QWidget *parent, YFrameArgs &args) :
00075 YFileViewFrame(parent, args) {}
00076 static YFrame* CreateLogFileViewFrame(QWidget *parent, YFrameArgs &args)
00077 { return new YLogFileViewFrame( parent, args); }
00078 virtual int InitInstance();
00079 virtual void SetBackdrop();
00080 virtual YFilePath* GetFilePath() const;
00081 };
00082
00083
00084
00085
00086
00087
00088
00089
00091 #endif // ifndef YASAGUI_SOURCESVIEW_INCLUDE