From e9ae80694875f869892f13f4fcaf1170a00dea41 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kxsldbg/kxsldbgpart/kxsldbg_part.h | 170 +++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 kxsldbg/kxsldbgpart/kxsldbg_part.h (limited to 'kxsldbg/kxsldbgpart/kxsldbg_part.h') diff --git a/kxsldbg/kxsldbgpart/kxsldbg_part.h b/kxsldbg/kxsldbgpart/kxsldbg_part.h new file mode 100644 index 00000000..1da5ceb8 --- /dev/null +++ b/kxsldbg/kxsldbgpart/kxsldbg_part.h @@ -0,0 +1,170 @@ +#ifndef KXSLDBGKPART_H +#define KXSLDBGKPART_H + +#include +#include +#include +#include +#include "xsldbgdebugger.h" +#include "xsldbginspector.h" +#include +#include "kxsldbg_partif.h" +#include +#include + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QAction; +class QActionGroup; +class QToolBar; +class QPopupMenu; +class QTextBrowser; +class QLineEdit; +class QDockWindow; +class QWidgetStack; + +class XsldbgBrkStatusView; +class QXsldbgDoc; +class XsldbgOutputView; +class XsldbgConfigImpl; + +class QWidget; +class QPainter; +class KURL; +class QMultiLineEdit; +class KAboutData; + +typedef QDict XsldbgDocDict; + +/** + * This is a "Part". It that does all the real work in a KPart + * application. + * + * @short Main Part + * @author Keith Isdale + * @version 0.1 + */ +class KXsldbgPart : public KParts::ReadOnlyPart, public KXsldbgPartIf +{ + Q_OBJECT + +public: + /** + * Default constructor + */ + KXsldbgPart(QWidget *parentWidget, const char *widgetName, + QObject *parent, const char *name, const QStringList &args); + + /** + * Destructor + */ + virtual ~KXsldbgPart(); + + static KAboutData *createAboutData(); + + + /** Checks the debugger, if it is not ready then + * display a error in a message box + * + * @returns TRUE if debugger is ready, otherwise FALSE + */ + bool checkDebugger(); + void lookupSystemID(QString systemID); + void lookupPublicID(QString publicID); + void createInspector(); + +public slots: + virtual bool openURL(const KURL &url); + virtual bool closeURL(); + void quit(); + void emitOpenFile(QString file, int line, int row); + void slotLookupSystemID(); + void slotLookupPublicID(); + void walkCmd_activated(); + void walkStopCmd_activated(); + void traceCmd_activated(); + void traceStopCmd_activated(); + void configureEditorCmd_activated(); + + //Tool bar commands + void configureCmd_activated(); + void inspectorCmd_activated(); + void runCmd_activated(); + void stepCmd_activated(); + void nextCmd_activated(); + void continueCmd_activated(); + void stepupCmd_activated(); + void stepdownCmd_activated(); + void sourceCmd_activated(); + void dataCmd_activated(); + void outputCmd_activated(); + void refreshCmd_activated(); + void enableCmd_activated(); + void breakCmd_activated(); + void deleteCmd_activated(); + + /** Evaluate expression entered */ + void evaluateCmd_activated(); + + /** Goto/display file XPath entered */ + void gotoXPathCmd_activated(); + + virtual void lineNoChanged( QString fileName, int lineNumber, + bool breakpoint ); + + void addBreakPoint(int lineNumber); + void enableBreakPoint(int lineNumber); + void deleteBreakPoint(int lineNumber); + + /** Evaluate expression entered in expressionEdit */ + void slotEvaluate(); + + /** Goto/display file that matches XPath specified in xPathEdit */ + void slotGotoXPath(); + + /** Run search on data base , see search.dtd for DTD of search database */ + void slotSearch(); + + /* Process the the URI for SystemID or PublicID requested */ + void slotProcResolveItem(QString URI); + + /* used to get breakpoint list notfication */ + void breakpointItem(QString fileName, int lineNumber , + QString /*templateName*/, QString /* modeName */, + bool enabled , int /* id */); + + void cursorPositionChanged(); + void docChanged(); + + void debuggerStarted(); + +protected: + /** + * This must be implemented by each part + */ + virtual bool openFile(); + bool fetchURL(const KURL &url); + +protected slots: + void fileOpen(); + +private: + QXsldbgDoc *currentDoc; + QWidgetStack *mainView; + + QPushButton *xPathBtn, *searchBtn, *evaluateBtn; + QLineEdit *newXPath, *newSearch, *newEvaluate; + QGridLayout* qxsldbgLayout; + + uint currentLineNo, currentColumnNo; + XsldbgDocDict docDictionary; + XsldbgInspector *inspector; + XsldbgDebugger *debugger; + XsldbgConfigImpl *configWidget; + QString currentFileName; + + XsldbgOutputView *outputview; +}; + +#endif // KXSLDBGPART_H -- cgit v1.2.1