| 1 | // File: outputpane.cppcxx . . $ `<file>/outputpane.cpp`/ |
| 2 | /* |
| 3 | Pep8-1 is a virtual machine for writing machine language and assembly |
| 4 | language programs. |
| 5 | |
| 6 | Copyright (C) 2009 J. Stanley Warford, Pepperdine University |
| 7 | |
| 8 | This program is free software: you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation, either version 3 of the License, or |
| 11 | (at your option) any later version. |
| 12 | |
| 13 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | */ |
| 21 | #include <QFontDialog> |
| 22 | #include <QScrollBar> |
| 23 | #include "outputpane.h"cxx . . $ `<file>/outputpane.h`/ |
| 24 | #include "ui_outputpane.h"cxx . . $ `<file>/ui_outputpane.h`/ |
| 25 | #include "pep.h"cxx . . $ `<file>/pep.h`/ |
| 26 | |
| 27 | OutputPanecxx . . $ OutputPane#::OutputPanecxx . . $ OutputPane#OutputPane(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# *parent) : |
| 28 | QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).(parent), |
| 29 | uicxx . . $ OutputPane#ui.(new Uicxx . . $ Ui/::OutputPanecxx . . $ Ui/OutputPane#) |
| 30 | { |
| 31 | uicxx . . $ OutputPane#ui.->setupUicxx . . $ Ui_OutputPane#setupUi(108f35f7aa7f3cf9).(this); |
| 32 | |
| 33 | uicxx . . $ OutputPane#ui.->labelcxx . . $ Ui_OutputPane#label.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(QFontcxx . . $ QFont#QFont(7ae16150a604556).(Pepcxx . . $ Pep#::labelFontcxx . . $ Pep#labelFont., Pepcxx . . $ Pep#::labelFontSizecxx . . $ Pep#labelFontSize.)); |
| 34 | uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(QFontcxx . . $ QFont#QFont(7ae16150a604556).(Pepcxx . . $ Pep#::codeFontcxx . . $ Pep#codeFont., Pepcxx . . $ Pep#::ioFontSizecxx . . $ Pep#ioFontSize.)); |
| 35 | } |
| 36 | |
| 37 | OutputPanecxx . . $ OutputPane#::~cxx . . $ OutputPane#`~OutputPane`(ced63f7c635d850d).OutputPanecxx . . $ OutputPane#() |
| 38 | { |
| 39 | delete uicxx . . $ OutputPane#ui.; |
| 40 | } |
| 41 | |
| 42 | void OutputPanecxx . . $ OutputPane#::appendOutputcxx . . $ OutputPane#appendOutput(7df51288a9ebd664).(QStringcxx . . $ QString# str) |
| 43 | { |
| 44 | uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->setPlainTextcxx . . $ QPlainTextEdit#setPlainText(3520e46b33348bf6).(uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->toPlainTextcxx . . $ QPlainTextEdit#toPlainText(6ef7b6c27b00b43d).().appendcxx . . $ QString#append(6a89d0b7f4d2681c).(str)); |
| 45 | uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->verticalScrollBarcxx . . $ QAbstractScrollArea#verticalScrollBar(49d9510c6adf8c19).()->setValuecxx . . $ QAbstractSlider#setValue(d4f767463ce0a6b3).(uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->verticalScrollBarcxx . . $ QAbstractScrollArea#verticalScrollBar(49d9510c6adf8c19).()->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).()); |
| 46 | } |
| 47 | |
| 48 | void OutputPanecxx . . $ OutputPane#::clearOutputcxx . . $ OutputPane#clearOutput(49f6e7a06ebc5aa8).() |
| 49 | { |
| 50 | uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->clearcxx . . $ QPlainTextEdit#clear(49f6e7a06ebc5aa8).(); |
| 51 | } |
| 52 | |
| 53 | void OutputPanecxx . . $ OutputPane#::highlightOnFocuscxx . . $ OutputPane#highlightOnFocus(49f6e7a06ebc5aa8).() |
| 54 | { |
| 55 | if (uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->hasFocuscxx . . $ QWidget#hasFocus(50ce9a9e25b4a850).()) { |
| 56 | uicxx . . $ OutputPane#ui.->labelcxx . . $ Ui_OutputPane#label.->setAutoFillBackgroundcxx . . $ QWidget#setAutoFillBackground(b45ddcbc8423892c).(true); |
| 57 | } |
| 58 | else { |
| 59 | uicxx . . $ OutputPane#ui.->labelcxx . . $ Ui_OutputPane#label.->setAutoFillBackgroundcxx . . $ QWidget#setAutoFillBackground(b45ddcbc8423892c).(false); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | bool OutputPanecxx . . $ OutputPane#::hasFocuscxx . . $ OutputPane#hasFocus(c9857a73d68e59ba).() |
| 64 | { |
| 65 | return uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->hasFocuscxx . . $ QWidget#hasFocus(50ce9a9e25b4a850).(); |
| 66 | } |
| 67 | |
| 68 | void OutputPanecxx . . $ OutputPane#::copycxx . . $ OutputPane#copy(49f6e7a06ebc5aa8).() |
| 69 | { |
| 70 | uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->copycxx . . $ QPlainTextEdit#copy(49f6e7a06ebc5aa8).(); |
| 71 | } |
| 72 | |
| 73 | void OutputPanecxx . . $ OutputPane#::onFontChangedcxx . . $ OutputPane#onFontChanged(19c44da831d1de49).(QFontcxx . . $ QFont# font) |
| 74 | { |
| 75 | uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(font); |
| 76 | } |
| 77 | |
| 78 | void OutputPanecxx . . $ OutputPane#::mouseReleaseEventcxx . . $ OutputPane#mouseReleaseEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent# *) |
| 79 | { |
| 80 | uicxx . . $ OutputPane#ui.->plainTextEditcxx . . $ Ui_OutputPane#plainTextEdit.->setFocuscxx . . $ QWidget#setFocus(49f6e7a06ebc5aa8).(); |
| 81 | } |