Added ApplesoftFileViewer widget.

This commit is contained in:
Mark Long 2015-12-04 21:45:27 -06:00
parent 1c6ae0358e
commit f2c1b51d40
4 changed files with 92 additions and 3 deletions

View File

@ -22,7 +22,8 @@ SOURCES += src/main.cpp \
src/binaryfile.cxx \
src/catalogwidget.cxx \
src/mainwindow.cxx \
src/hiresviewwidget.cxx
src/hiresviewwidget.cxx \
src/applesoftfileviewer.cxx
HEADERS += \
src/diskfile.h \
@ -39,8 +40,10 @@ HEADERS += \
src/binaryfile.h \
src/catalogwidget.h \
src/mainwindow.h \
src/hiresviewwidget.h
src/hiresviewwidget.h \
src/applesoftfileviewer.h
FORMS += \
src/catalogwidget.ui \
src/mainwindow.ui
src/mainwindow.ui \
src/applesoftfileviewer.ui

View File

@ -0,0 +1,24 @@
#include "applesoftfileviewer.h"
#include "ui_applesoftfileviewer.h"
ApplesoftFileViewer::ApplesoftFileViewer(QWidget *parent) :
QWidget(parent),
ui(new Ui::ApplesoftFileViewer)
{
ui->setupUi(this);
}
ApplesoftFileViewer::~ApplesoftFileViewer()
{
delete ui;
}
void ApplesoftFileViewer::setData(QByteArray data)
{
ui->textArea->setText(data);
}
void ApplesoftFileViewer::setText(QString text)
{
ui->textArea->setHtml(text);
}

26
src/applesoftfileviewer.h Normal file
View File

@ -0,0 +1,26 @@
#ifndef APPLESOFTFILEVIEWER_H
#define APPLESOFTFILEVIEWER_H
#include <QWidget>
namespace Ui {
class ApplesoftFileViewer;
}
class ApplesoftFileViewer : public QWidget
{
Q_OBJECT
public:
explicit ApplesoftFileViewer(QWidget *parent = 0);
~ApplesoftFileViewer();
public slots:
void setData(QByteArray data);
void setText(QString text);
private:
Ui::ApplesoftFileViewer *ui;
};
#endif // APPLESOFTFILEVIEWER_H

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ApplesoftFileViewer</class>
<widget class="QWidget" name="ApplesoftFileViewer">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>857</width>
<height>469</height>
</rect>
</property>
<property name="font">
<font>
<family>Century Schoolbook L</family>
</font>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTextBrowser" name="textArea">
<property name="font">
<font>
<family>Source Code Pro</family>
<pointsize>10</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>