summaryrefslogtreecommitdiffstats
path: root/src/codeeditor.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-19 18:45:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-19 18:45:49 +0000
commit09a528fd59d3ea5f69575a92574f7a87898dc068 (patch)
tree9e465c49fbbe65f70d4feca3fcfb2ab3a7cf00d4 /src/codeeditor.h
downloadkpicosim-09a528fd59d3ea5f69575a92574f7a87898dc068.tar.gz
kpicosim-09a528fd59d3ea5f69575a92574f7a87898dc068.zip
Added old abandoned (but very good!) KDE3 KPicoSim application
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpicosim@1092928 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/codeeditor.h')
-rwxr-xr-xsrc/codeeditor.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/codeeditor.h b/src/codeeditor.h
new file mode 100755
index 0000000..a3a57ce
--- /dev/null
+++ b/src/codeeditor.h
@@ -0,0 +1,98 @@
+/***************************************************************************
+ * Copyright (C) 2005 by Mark Six *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+#ifndef CODEEDITOR_H
+#define CODEEDITOR_H
+
+#include <qwidget.h>
+#include <kate/view.h>
+#include <kate/document.h>
+#include <kstatusbar.h>
+
+class CodeEditor : public QWidget
+{
+ Q_OBJECT
+ public:
+ CodeEditor(QWidget *parent = 0, const char *name = 0);
+ ~CodeEditor();
+
+ void clearExecutionMarker() ;
+ void setExecutionMarker( unsigned int line ) ;
+
+ QString getFilename() ;
+ bool isBreakpoint( unsigned int line ) ;
+ void setCursor( unsigned int line ) ;
+
+ void open( QString filename ) ;
+ bool close() ;
+ bool save() ;
+
+ protected:
+ Kate::View * m_view ;
+ Kate::Document * m_doc ;
+
+ KStatusBar *m_statusBar ;
+
+ unsigned int m_exeLine ;
+ QString m_filename ;
+ bool m_bFilename ;
+ void setHighlightMode() ;
+ bool askSave() ;
+
+ enum MarkType {
+ Bookmark = KTextEditor::MarkInterface::markType01,
+ Breakpoint = KTextEditor::MarkInterface::markType02,
+ ActiveBreakpoint = KTextEditor::MarkInterface::markType03,
+ ReachedBreakpoint = KTextEditor::MarkInterface::markType04,
+ DisabledBreakpoint = KTextEditor::MarkInterface::markType05,
+ ExecutionPoint = KTextEditor::MarkInterface::markType06
+ };
+
+
+ static const QPixmap* inactiveBreakpointPixmap();
+ static const QPixmap* activeBreakpointPixmap();
+ static const QPixmap* reachedBreakpointPixmap();
+ static const QPixmap* disabledBreakpointPixmap();
+ static const QPixmap* executionPointPixmap();
+
+
+ public slots:
+ void slotToggleBreakpoint() ; // set breakpoint at current position
+ void slotSave() ;
+ void slotSaveAs() ;
+ void slotOpen() ;
+ void slotShowConfig() ;
+ void slotFind() ;
+ void slotFindNext() ;
+ void slotNewFile() ;
+ void slotPrint() ;
+
+ void slotCut() ;
+ void slotCopy() ;
+ void slotPaste() ;
+
+ void slotUndo() ;
+ void slotRedo() ;
+ void slotSelectAll() ;
+
+ void slotCursorPositionChanged() ;
+
+};
+
+#endif