Mercurial > hg > octave-lyh
changeset 15652:2d6724358c12
Corrected INCLUDEPATH.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 30 Jan 2012 11:42:26 +0100 |
parents | 845cebf281aa |
children | 35c891dce299 |
files | libqterminal/QTerminal libqterminal/QTerminal.h libqterminal/libqterminal.pro libqterminal/unix/QUnixTerminalImpl.cpp libqterminal/win32/QTerminalColors.cpp libqterminal/win32/QWinTerminalImpl.cpp libqterminal/win32/QWinTerminalImpl.h |
diffstat | 7 files changed, 56 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/libqterminal/QTerminal +++ b/libqterminal/QTerminal @@ -1,1 +1,23 @@ -#include <QTerminal.h> +/* + +Copyright (C) 2012 Michael Goffioul. +Copyright (C) 2012 Jacob Dawid. + +This file is part of QTerminal. + +Foobar 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 3 of the License, or +(at your option) any later version. + +QTerminal 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 Foobar. If not, see <http://www.gnu.org/licenses/>. + +*/ + +#include "QTerminal.h"
--- a/libqterminal/QTerminal.h +++ b/libqterminal/QTerminal.h @@ -23,10 +23,10 @@ #ifndef QTERMINAL_H #define QTERMINAL_H -#ifdef Q_OS_UNIX - #include "unix/QUnixTerminalImpl.h" +#ifdef __WIN32 + #include "win32/QWinTerminalImpl.h" #else - #include "win32/QWinTerminalImpl.h" + #include "unix/QUnixTerminalImpl.h" #endif #endif // QTERMINAL_H
--- a/libqterminal/libqterminal.pro +++ b/libqterminal/libqterminal.pro @@ -12,7 +12,7 @@ DEFINES += HAVE_POSIX_OPENPT #or DEFINES += HAVE_GETPT -INCLUDE_PATH += unix +INCLUDEPATH += unix HEADERS = unix/BlockArray.h \ unix/Character.h \ unix/CharacterColor.h \ @@ -52,7 +52,7 @@ } win32 { -INCLUDE_PATH += win32 +INCLUDEPATH += win32 HEADERS = win32/QTerminalColors.h \ win32/QWinTerminalImpl.h
--- a/libqterminal/unix/QUnixTerminalImpl.cpp +++ b/libqterminal/unix/QUnixTerminalImpl.cpp @@ -19,7 +19,7 @@ #include <QDebug> -#include "QTerminal.h" +#include "QUnixTerminalImpl.h" #include "kpty.h" #include <termios.h>
--- a/libqterminal/win32/QTerminalColors.cpp +++ b/libqterminal/win32/QTerminalColors.cpp @@ -22,7 +22,7 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> -#include "QConsoleColors.h" +#include "QTerminalColors.h" //////////////////////////////////////////////////////////////////////////////
--- a/libqterminal/win32/QWinTerminalImpl.cpp +++ b/libqterminal/win32/QWinTerminalImpl.cpp @@ -39,8 +39,8 @@ #include <windows.h> #include <cstring> -#include "QConsole.h" -#include "QConsoleColors.h" +#include "QWinTerminalImpl.h" +#include "QTerminalColors.h" // Uncomment to log activity to LOGFILENAME // #define DEBUG_QCONSOLE @@ -53,7 +53,7 @@ class QConsoleView : public QWidget { public: - QConsoleView (QConsole* parent = 0) : QWidget (parent), q (parent) { } + QConsoleView (QTerminal* parent = 0) : QWidget (parent), q (parent) { } ~QConsoleView (void) { } protected: @@ -61,7 +61,7 @@ void resizeEvent (QResizeEvent* event) { q->viewResizeEvent (this, event); } private: - QConsole* q; + QTerminal* q; }; ////////////////////////////////////////////////////////////////////////////// @@ -69,24 +69,24 @@ class QConsoleThread : public QThread { public: - QConsoleThread (QConsole* console) : QThread (console), q (console) { } + QConsoleThread (QTerminal* console) : QThread (console), q (console) { } protected: void run (void) { q->start (); } private: - QConsole* q; + QTerminal* q; }; ////////////////////////////////////////////////////////////////////////////// class QConsolePrivate { - friend class QConsole; + friend class QTerminal; public: - QConsolePrivate (QConsole* parent, const QString& cmd = QString ()); + QConsolePrivate (QTerminal* parent, const QString& cmd = QString ()); ~QConsolePrivate (void); void updateConsoleSize (bool sync = false); @@ -106,7 +106,7 @@ const char* devName); private: - QConsole* q; + QTerminal* q; private: QFont m_font; @@ -135,7 +135,7 @@ ////////////////////////////////////////////////////////////////////////////// -QConsolePrivate::QConsolePrivate (QConsole* parent, const QString& cmd) +QConsolePrivate::QConsolePrivate (QTerminal* parent, const QString& cmd) : q (parent), m_command (cmd), m_process (NULL), m_inWheelEvent (false) { log (NULL); @@ -686,28 +686,28 @@ ////////////////////////////////////////////////////////////////////////////// -QConsole::QConsole (QWidget* parent) +QTerminal::QTerminal (QWidget* parent) : d (new QConsolePrivate (this)) { } ////////////////////////////////////////////////////////////////////////////// -QConsole::QConsole (const QString& cmd, QWidget* parent) +QTerminal::QTerminal (const QString& cmd, QWidget* parent) : d (new QConsolePrivate (this, cmd)) { } ////////////////////////////////////////////////////////////////////////////// -QConsole::~QConsole (void) +QTerminal::~QTerminal (void) { delete d; } ////////////////////////////////////////////////////////////////////////////// -void QConsole::viewResizeEvent (QConsoleView*, QResizeEvent*) +void QTerminal::viewResizeEvent (QConsoleView*, QResizeEvent*) { d->updateConsoleSize (true); d->grabConsoleBuffer (); @@ -715,7 +715,7 @@ ////////////////////////////////////////////////////////////////////////////// -void QConsole::viewPaintEvent (QConsoleView* w, QPaintEvent* event) +void QTerminal::viewPaintEvent (QConsoleView* w, QPaintEvent* event) { QPainter p (w); int cw = d->m_charSize.width (), ch = d->m_charSize.height (); @@ -805,7 +805,7 @@ ////////////////////////////////////////////////////////////////////////////// -void QConsole::wheelEvent (QWheelEvent* event) +void QTerminal::wheelEvent (QWheelEvent* event) { if (! d->m_inWheelEvent) { @@ -818,7 +818,7 @@ ////////////////////////////////////////////////////////////////////////////// -bool QConsole::winEvent (MSG* msg, long* result) +bool QTerminal::winEvent (MSG* msg, long* result) { switch (msg->message) { @@ -839,35 +839,35 @@ ////////////////////////////////////////////////////////////////////////////// -void QConsole::scrollValueChanged (int value) +void QTerminal::scrollValueChanged (int value) { d->setScrollValue (value); } ////////////////////////////////////////////////////////////////////////////// -void QConsole::monitorConsole (void) +void QTerminal::monitorConsole (void) { d->monitorConsole (); } ////////////////////////////////////////////////////////////////////////////// -void QConsole::focusInEvent (QFocusEvent* event) +void QTerminal::focusInEvent (QFocusEvent* event) { QWidget::focusInEvent (event); } ////////////////////////////////////////////////////////////////////////////// -void QConsole::start (void) +void QTerminal::start (void) { d->startCommand (); } ////////////////////////////////////////////////////////////////////////////// -void QConsole::sendText (const QString& s) +void QTerminal::sendText (const QString& s) { d->sendConsoleText (s); }
--- a/libqterminal/win32/QWinTerminalImpl.h +++ b/libqterminal/win32/QWinTerminalImpl.h @@ -36,7 +36,7 @@ ////////////////////////////////////////////////////////////////////////////// -class QConsole : public QWidget +class QTerminal : public QWidget { Q_OBJECT friend class QConsolePrivate; @@ -44,9 +44,9 @@ friend class QConsoleView; public: - QConsole (QWidget* parent = 0); - QConsole (const QString& cmd, QWidget* parent = 0); - ~QConsole (void); + QTerminal (QWidget* parent = 0); + QTerminal (const QString& cmd, QWidget* parent = 0); + ~QTerminal (void); void sendText (const QString& s);