Permalink
Browse files

Nearing beta

  • Loading branch information...
1 parent dcb4b31 commit 943328b9892ee0c77e64bfaa67e4b831d409ff42 Braden McDorman committed Jul 23, 2011
View
@@ -1,3 +1,4 @@
+doc
*.dylib
*.o
moc_*
View
@@ -2,7 +2,7 @@ CONFIG -= debug release_and_debug
CONFIG += release
mac:CONFIG += x86
-QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.6.sdk
+#QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.6.sdk
unix:QMAKE_DEL_FILE=rm -rf
win32:CONFIG -= embed_manifest_dll
View
1,697 doxygen.conf

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -26,6 +26,11 @@
#include <QDataStream>
#include <QObject>
+/*! \struct Location
+ * \brief Stores a line number and file name
+ *
+ * Used in communcation between Debugger and DebuggerInterface
+ */
struct Location
{
Location(QString file, int line) : file(file), line(line) {}
@@ -34,6 +39,11 @@ struct Location
int line;
};
+/*! \struct Variable
+ * \brief Stores a name and value
+ *
+ * Used in communcation between Debugger and DebuggerInterface
+ */
struct Variable
{
Variable(QString name, QString value) : name(name), value(value) {}
@@ -42,6 +52,11 @@ struct Variable
QString value;
};
+/*! \struct Breakpoint
+ * \brief Stores a file name, function name, and line number
+ *
+ * Used in communcation between Debugger and DebuggerInterface
+ */
struct Breakpoint
{
QString function;
@@ -51,6 +66,11 @@ struct Breakpoint
bool enabled;
};
+/*! \struct Frame
+ * \brief Stores a file name, function name, line number, and list of Variable objects
+ *
+ * Used in communcation between Debugger and DebuggerInterface
+ */
struct Frame
{
QString function;
View
@@ -27,14 +27,22 @@
#define KISS_ARCHIVE_VERSION 1
#define KISS_ARCHIVE_FILE "installed"
+/*! \struct KissReturn
+ * \brief Holds a KissArchive command return value
+ */
struct KissReturn
{
KissReturn(const bool& error, const QString& message = "") : error(error), message(message) {}
+ /*! True if error occurred */
bool error;
+ /*! Holds message of error if an error occurred */
QString message;
};
+/*! \class KissArchive
+ * \brief Holds methods to manipulate Kiss Archives
+ */
class KissArchive
{
public:
View
@@ -34,8 +34,14 @@
#include <qplugin.h>
#include <QString>
+/*! \struct LexerSpec
+ * \brief Contains everything necessary to highlight a language
+ *
+ * These are to be implemented by a LexerProvider, then loaded at runtime
+ */
struct LexerSpec {
QString language;
+ /*! Internal lexer as identified by QScintilla */
QString lexer;
QStringList autoCompletionWordSeparators;
QString blockEnd;
@@ -53,14 +59,23 @@ struct LexerSpec {
QMap<int, QString> keywords;
};
+/*! \class LexerProvider
+ * \brief Interface for Lexer Plugins.
+ *
+ * A LexerProvider is loaded by the LexerManager, and provides one LexerSpec for a number of languages.
+ */
class LexerProvider
{
public:
LexerProvider(const QString& extension) : m_lexerSpec(), m_extension(extension) {}
+ /*! Init sets up a LexerSpec. This should be the only function needed in a plugin */
virtual void init() = 0;
+
+ /*! \return All extensions provided by the lexer provider. Language extensions separated by a space */
QString extension() const { return m_extension; }
+ /*! \return Inited LexerSpec */
LexerSpec* lexerSpec() { return &m_lexerSpec; }
protected:
@@ -70,6 +85,11 @@ class LexerProvider
Q_DECLARE_INTERFACE(LexerProvider, "com.kipr.kiss-c.LexerProvider/3.0");
+/*! \class Lexer
+ * \brief Interfaces LexerSpec with QScintilla's QsciLexer.
+ *
+ * Wraps LexerSpec struct in QsciLexer, allowing LexerSpecs to be loaded into the SourceFile editor.
+ */
class Lexer : public QsciLexer
{
Q_OBJECT
View
@@ -31,8 +31,15 @@
#include <QToolButton>
#include <QListWidget>
+#define RECENTS "recents"
+
class QListWidgetItem;
+/*! \class MainWindow
+ * \brief Holds tabs to display
+ *
+ * Very little is actually implemented in MainWindow. Instead, most is in the implementation of every Tab.
+ */
class MainWindow : public QMainWindow, private Ui::MainWindow, public Singleton<MainWindow>
{
Q_OBJECT
@@ -43,28 +50,64 @@ class MainWindow : public QMainWindow, private Ui::MainWindow, public Singleton<
void closeEvent(QCloseEvent *e);
+ /*!
+ * Creates a new SourceFile tab
+ */
void newFile();
+
+ /*!
+ * Opens a file with SourceFile tab
+ * \param filePath Path to file
+ */
bool openFile(const QString& filePath);
void initMenus(Tab* tab);
+ /*! Sets Window Title
+ * \param title Title to append to primary window name
+ */
void setTitle(const QString& title);
+
+ /*! Sets Tab title
+ * \param widget Tab to set
+ * \param string String to set tab's text to.
+ */
void setTabName(QWidget* widget, const QString& string);
+
+ /*! Sets Window's status message
+ * \param message Message to display
+ * \param time Time to display in milliseconds
+ */
void setStatusMessage(const QString& message, int time = 0);
+ /*! Shows given errors in Error View */
void setErrors(Tab* tab,
const QStringList& errors, const QStringList& warnings,
const QStringList& linker, const QStringList& verbose);
void hideErrors();
+ /*!
+ * Deletes tab at given index. Does NOT clean up tab via close method.
+ * \param index Tab to add
+ */
void deleteTab(int index);
+
+ /*!
+ * Adds given tab window. Calls tab setup functions.
+ * \param tab Tab to add
+ */
void addTab(Tab* tab);
QTabWidget* tabWidget();
+ /*!
+ * Closes all but given tab
+ * \param tab Tab to keep open
+ */
void closeAllOthers(Tab* tab);
+ /*! Reinits menus for current tab */
void refreshMenus();
public slots:
@@ -82,6 +125,7 @@ private slots:
void on_ui_tabWidget_currentChanged(int i);
void on_actionManagePackages_triggered();
void on_actionInstallLocalPackage_triggered();
+ void openRecent();
void errorClicked(QListWidgetItem* item);
View
@@ -14,18 +14,27 @@
typedef QMap<QString, QPluginLoader*> PluginMap;
+/*! \class PluginManager
+ * \brief Manages loading/unloading of Qt plugins.
+ *
+ * Takes M, the name of the Manager, and T, the name of the Plugin Interface
+ * Maps the plugins to PluginMap, expecting each to be referenced using a unique name.
+ */
template<typename M, typename T>
class PluginManager : public Singleton<M>
{
public:
+ //! Get plugin instance, loads if not found
T* get(const QString& name) {
if(!m_plugins.contains(name))
if(!loadPlugin(name)) return 0;
return qobject_cast<T*>(m_plugins[name]->instance());
}
+ //! Unloads all plugins
void unloadAll() { while (!m_plugins.isEmpty()) unloadPlugin(m_plugins.begin().key()); }
+ //! Loads plugin by given name
bool loadPlugin(const QString& name) {
if(m_plugins.contains(name)) return false;
@@ -60,6 +69,7 @@ class PluginManager : public Singleton<M>
return true;
}
+ //! Unloads plugin by given name
void unloadPlugin(const QString& name) {
if(!m_plugins.contains(name)) return;
pluginUnloaded(qobject_cast<T*>(m_plugins[name]->instance()));
View
@@ -1,10 +1,14 @@
#ifndef __SINGLETON_H__
#define __SINGLETON_H__
+/*! \class Singleton
+ * \brief Implements a simple Singleton Pattern
+ */
template<typename T>
class Singleton
{
public:
+ /*! \return Reference to singleton object */
static T& ref() {
static T instance;
return instance;
View
@@ -30,7 +30,6 @@
#include "ui_SourceFile.h"
#include "Tab.h"
#include "Debugger.h"
-#include "FindDialog.h"
#include <QtGlobal>
#include <Qsci/qsciscintilla.h>
@@ -69,10 +68,14 @@ Q_OBJECT
bool close();
+ //! \return File's Name
QString fileName();
+ //! \return Absolute path to current file
QString filePath();
+ //! \return true if file is new
bool isNewFile();
+ //! \return Current zoom level
int getZoom();
QsciScintilla* getEditor();
@@ -84,10 +87,15 @@ public slots:
void refreshSettings();
void updateMargins();
+ //! Increase editor's zoom level
void zoomIn();
+ //! Decreate editor's zoom level
void zoomOut();
+ //! Promps user to save file to a browsed location
void on_actionSaveAs_triggered();
+
+ //! Save current file
bool fileSave();
void sourceModified(bool m);
@@ -121,7 +129,16 @@ private slots:
void on_actionClearBreakpoints_triggered();
void on_ui_editor_cursorPositionChanged(int line, int index);
+
+ void on_ui_next_clicked();
+ void on_ui_find_textChanged(const QString& text);
+ void on_ui_matchCase_stateChanged(int state);
+ void on_ui_replaceNext_clicked();
+ void on_ui_replaceAll_clicked();
private:
+ void showFind();
+ bool checkPort();
+
QFile m_fileHandle;
QFileInfo m_fileInfo;
bool m_isNewFile;
@@ -130,7 +147,6 @@ private slots:
Target m_target;
LexerSpec* m_lexSpec;
QString m_lexAPI;
- FindDialog m_findDialog;
QString m_targetName;
QString m_templateExt;
@@ -143,6 +159,7 @@ private slots:
int m_currentLine;
QWidget* m_runTab;
+ bool m_findModified;
void clearProblems();
void markProblems(const QStringList& errors, const QStringList& warnings);
Oops, something went wrong.

0 comments on commit 943328b

Please sign in to comment.