mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-17 09:02:38 -05:00
WpsEditor: add linenumbrs WpsEditor: Add linenumbers to the WPS Code, and highlight the error line, if parsing fails. (FS#9362)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18483 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1ff9ce202d
commit
f414c6e19f
6 changed files with 339 additions and 100 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
TARGET =
|
TARGET =
|
||||||
DEPENDPATH += . build src ui
|
DEPENDPATH += . build src ui
|
||||||
INCLUDEPATH += . src/QPropertyEditor ../libwps/src
|
INCLUDEPATH += . src src/QPropertyEditor ../libwps/src
|
||||||
DESTDIR = bin
|
DESTDIR = bin
|
||||||
OBJECTS_DIR = build
|
OBJECTS_DIR = build
|
||||||
MOC_DIR = build
|
MOC_DIR = build
|
||||||
|
|
@ -17,7 +17,9 @@ HEADERS += ../libwps/src/api.h \
|
||||||
src/qwpseditorwindow.h \
|
src/qwpseditorwindow.h \
|
||||||
src/utils.h \
|
src/utils.h \
|
||||||
src/qwpsdrawer.h \
|
src/qwpsdrawer.h \
|
||||||
src/qsyntaxer.h
|
src/qsyntaxer.h \
|
||||||
|
src/numberedtextview.h
|
||||||
|
|
||||||
FORMS += ui/mainwindow.ui ui/slider.ui
|
FORMS += ui/mainwindow.ui ui/slider.ui
|
||||||
SOURCES += src/main.cpp \
|
SOURCES += src/main.cpp \
|
||||||
src/slider.cpp \
|
src/slider.cpp \
|
||||||
|
|
@ -27,8 +29,10 @@ SOURCES += src/main.cpp \
|
||||||
src/utils.cpp \
|
src/utils.cpp \
|
||||||
src/qwpsdrawer.cpp \
|
src/qwpsdrawer.cpp \
|
||||||
src/qwpsdrawer_static.cpp \
|
src/qwpsdrawer_static.cpp \
|
||||||
src/qsyntaxer.cpp
|
src/qsyntaxer.cpp \
|
||||||
LIBS += -Lbin
|
src/numberedtextview.cpp
|
||||||
|
|
||||||
|
LIBS += -Lbin
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
LIBS += -lQPropertyEditord
|
LIBS += -lQPropertyEditord
|
||||||
TARGET = wpseditord
|
TARGET = wpseditord
|
||||||
|
|
|
||||||
181
utils/wpseditor/gui/src/numberedtextview.cpp
Normal file
181
utils/wpseditor/gui/src/numberedtextview.cpp
Normal file
|
|
@ -0,0 +1,181 @@
|
||||||
|
/* This file is part of the KDE libraries
|
||||||
|
Copyright (C) 2005, 2006 KJSEmbed Authors
|
||||||
|
See included AUTHORS file.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library 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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------
|
||||||
|
Imported into the WPS editor and simplified by Dominik Wenger
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <QTextDocument>
|
||||||
|
#include <QTextBlock>
|
||||||
|
#include <QTextEdit>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QScrollBar>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QAbstractTextDocumentLayout>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
#include "numberedtextview.h"
|
||||||
|
|
||||||
|
NumberBar::NumberBar( QWidget *parent )
|
||||||
|
: QWidget( parent ), edit(0), markedLine(-1)
|
||||||
|
{
|
||||||
|
// Make room for 4 digits and the breakpoint icon
|
||||||
|
setFixedWidth( fontMetrics().width( QString("0000") + 10 + 32 ) );
|
||||||
|
markerIcon = QPixmap( "images/marker.png" );
|
||||||
|
}
|
||||||
|
|
||||||
|
NumberBar::~NumberBar()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void NumberBar::markLine( int lineno )
|
||||||
|
{
|
||||||
|
markedLine = lineno;
|
||||||
|
}
|
||||||
|
|
||||||
|
void NumberBar::setTextEdit( QTextEdit *edit )
|
||||||
|
{
|
||||||
|
this->edit = edit;
|
||||||
|
connect( edit->document()->documentLayout(), SIGNAL( update(const QRectF &) ),
|
||||||
|
this, SLOT( update() ) );
|
||||||
|
connect( edit->verticalScrollBar(), SIGNAL(valueChanged(int) ),
|
||||||
|
this, SLOT( update() ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void NumberBar::paintEvent( QPaintEvent * )
|
||||||
|
{
|
||||||
|
QAbstractTextDocumentLayout *layout = edit->document()->documentLayout();
|
||||||
|
int contentsY = edit->verticalScrollBar()->value();
|
||||||
|
qreal pageBottom = contentsY + edit->viewport()->height();
|
||||||
|
const QFontMetrics fm = fontMetrics();
|
||||||
|
const int ascent = fontMetrics().ascent() + 1; // height = ascent + descent + 1
|
||||||
|
int lineCount = 1;
|
||||||
|
|
||||||
|
QPainter p(this);
|
||||||
|
|
||||||
|
markedRect = QRect();
|
||||||
|
|
||||||
|
for ( QTextBlock block = edit->document()->begin();
|
||||||
|
block.isValid(); block = block.next(), ++lineCount )
|
||||||
|
{
|
||||||
|
|
||||||
|
const QRectF boundingRect = layout->blockBoundingRect( block );
|
||||||
|
|
||||||
|
QPointF position = boundingRect.topLeft();
|
||||||
|
if ( position.y() + boundingRect.height() < contentsY )
|
||||||
|
continue;
|
||||||
|
if ( position.y() > pageBottom )
|
||||||
|
break;
|
||||||
|
|
||||||
|
const QString txt = QString::number( lineCount );
|
||||||
|
p.drawText( width() - fm.width(txt), qRound( position.y() ) - contentsY + ascent, txt );
|
||||||
|
|
||||||
|
// marker
|
||||||
|
if ( markedLine == lineCount )
|
||||||
|
{
|
||||||
|
p.drawPixmap( 1, qRound( position.y() ) - contentsY, markerIcon );
|
||||||
|
markedRect = QRect( 1, qRound( position.y() ) - contentsY, markerIcon.width(), markerIcon.height() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NumberedTextView::NumberedTextView( QWidget *parent )
|
||||||
|
: QFrame( parent )
|
||||||
|
{
|
||||||
|
setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
|
||||||
|
setLineWidth( 2 );
|
||||||
|
|
||||||
|
// Setup the main view
|
||||||
|
view = new QTextEdit( this );
|
||||||
|
//view->setFontFamily( "Courier" );
|
||||||
|
view->setLineWrapMode( QTextEdit::NoWrap );
|
||||||
|
view->setFrameStyle( QFrame::NoFrame );
|
||||||
|
|
||||||
|
connect( view->document(), SIGNAL(contentsChange(int,int,int)), this, SLOT(textChanged(int,int,int)) );
|
||||||
|
|
||||||
|
// Setup the line number pane
|
||||||
|
numbers = new NumberBar( this );
|
||||||
|
numbers->setTextEdit( view );
|
||||||
|
|
||||||
|
// Test
|
||||||
|
markLine(2);
|
||||||
|
|
||||||
|
//setup layout
|
||||||
|
box = new QHBoxLayout( this );
|
||||||
|
box->setSpacing( 0 );
|
||||||
|
box->setMargin( 0 );
|
||||||
|
box->addWidget( numbers );
|
||||||
|
box->addWidget( view );
|
||||||
|
}
|
||||||
|
|
||||||
|
NumberedTextView::~NumberedTextView()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void NumberedTextView::markLine( int lineno )
|
||||||
|
{
|
||||||
|
markedLine = lineno;
|
||||||
|
numbers->markLine( lineno );
|
||||||
|
textChanged(1,1,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void NumberedTextView::scrolltoLine( int lineno )
|
||||||
|
{
|
||||||
|
int max = view->verticalScrollBar()->maximum();
|
||||||
|
int min = view->verticalScrollBar()->minimum();
|
||||||
|
int lines = view->document()->blockCount();
|
||||||
|
view->verticalScrollBar()->setValue( (max*lineno)/lines+min );
|
||||||
|
}
|
||||||
|
|
||||||
|
void NumberedTextView::textChanged( int pos, int removed, int added )
|
||||||
|
{
|
||||||
|
Q_UNUSED( pos );
|
||||||
|
|
||||||
|
if ( removed == 0 && added == 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
QTextBlock block = highlight.block();
|
||||||
|
QTextBlockFormat fmt = block.blockFormat();
|
||||||
|
QColor bg = view->palette().base().color();
|
||||||
|
fmt.setBackground( bg );
|
||||||
|
highlight.setBlockFormat( fmt );
|
||||||
|
|
||||||
|
int lineCount = 1;
|
||||||
|
for ( QTextBlock block = view->document()->begin();
|
||||||
|
block.isValid(); block = block.next(), ++lineCount )
|
||||||
|
{
|
||||||
|
if ( lineCount == markedLine )
|
||||||
|
{
|
||||||
|
fmt = block.blockFormat();
|
||||||
|
QColor bg = Qt::red;
|
||||||
|
fmt.setBackground( bg.light(150) );
|
||||||
|
|
||||||
|
highlight = QTextCursor( block );
|
||||||
|
highlight.movePosition( QTextCursor::EndOfBlock, QTextCursor::KeepAnchor );
|
||||||
|
highlight.setBlockFormat( fmt );
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
87
utils/wpseditor/gui/src/numberedtextview.h
Normal file
87
utils/wpseditor/gui/src/numberedtextview.h
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
/* This file is part of the KDE libraries
|
||||||
|
Copyright (C) 2005, 2006 KJSEmbed Authors
|
||||||
|
See included AUTHORS file.
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library 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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------
|
||||||
|
Imported into the WPS editor and simplified by Dominik Wenger
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NUMBERED_TEXT_VIEW_H
|
||||||
|
#define NUMBERED_TEXT_VIEW_H
|
||||||
|
|
||||||
|
#include <QFrame>
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QTextCursor>
|
||||||
|
|
||||||
|
class QTextEdit;
|
||||||
|
class QHBoxLayout;
|
||||||
|
|
||||||
|
// Shows the Line numbers
|
||||||
|
class NumberBar : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
NumberBar( QWidget *parent );
|
||||||
|
~NumberBar();
|
||||||
|
|
||||||
|
void markLine( int lineno );
|
||||||
|
|
||||||
|
void setTextEdit( QTextEdit *edit );
|
||||||
|
void paintEvent( QPaintEvent *ev );
|
||||||
|
|
||||||
|
private:
|
||||||
|
QTextEdit *edit;
|
||||||
|
QPixmap markerIcon;
|
||||||
|
int markedLine;
|
||||||
|
QRect markedRect;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Shows a QTextEdit with Line numbers
|
||||||
|
class NumberedTextView : public QFrame
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
NumberedTextView( QWidget *parent = 0 );
|
||||||
|
~NumberedTextView();
|
||||||
|
|
||||||
|
/** Returns the QTextEdit of the main view. */
|
||||||
|
QTextEdit *textEdit() const { return view; }
|
||||||
|
|
||||||
|
/* marks the line with a icon */
|
||||||
|
void markLine( int lineno );
|
||||||
|
|
||||||
|
void scrolltoLine( int lineno );
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void textChanged( int pos, int removed, int added );
|
||||||
|
|
||||||
|
private:
|
||||||
|
QTextEdit *view;
|
||||||
|
NumberBar *numbers;
|
||||||
|
QHBoxLayout *box;
|
||||||
|
QTextCursor highlight;
|
||||||
|
int markedLine;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // NUMBERED_TEXT_VIEW_H
|
||||||
|
|
||||||
|
|
@ -47,6 +47,7 @@ const char *playmodeNames[] = {
|
||||||
QWpsEditorWindow::QWpsEditorWindow( QWidget * parent, Qt::WFlags f)
|
QWpsEditorWindow::QWpsEditorWindow( QWidget * parent, Qt::WFlags f)
|
||||||
: QMainWindow(parent, f) {
|
: QMainWindow(parent, f) {
|
||||||
logEdit = 0;
|
logEdit = 0;
|
||||||
|
scrollingLine = -1;
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
drawer = new QWpsDrawer(&wpsState,&trackState, this);
|
drawer = new QWpsDrawer(&wpsState,&trackState, this);
|
||||||
QWpsDrawer::api.verbose = 1;
|
QWpsDrawer::api.verbose = 1;
|
||||||
|
|
@ -54,7 +55,8 @@ QWpsEditorWindow::QWpsEditorWindow( QWidget * parent, Qt::WFlags f)
|
||||||
connectActions();
|
connectActions();
|
||||||
m_propertyEditor->addObject(&trackState);
|
m_propertyEditor->addObject(&trackState);
|
||||||
m_propertyEditor->addObject(&wpsState);
|
m_propertyEditor->addObject(&wpsState);
|
||||||
new QSyntaxer(plainWpsEdit->document());
|
new QSyntaxer(plainWpsEdit->textEdit()->document());
|
||||||
|
plainWpsEdit->markLine(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWpsEditorWindow::connectActions() {
|
void QWpsEditorWindow::connectActions() {
|
||||||
|
|
@ -65,7 +67,7 @@ void QWpsEditorWindow::connectActions() {
|
||||||
connect(actShowGrid, SIGNAL(triggered(bool)), drawer, SLOT(slotShowGrid(bool)));
|
connect(actShowGrid, SIGNAL(triggered(bool)), drawer, SLOT(slotShowGrid(bool)));
|
||||||
|
|
||||||
connect(actUpdatePlainWps, SIGNAL(triggered()), SLOT(slotUpdatePlainWps()));
|
connect(actUpdatePlainWps, SIGNAL(triggered()), SLOT(slotUpdatePlainWps()));
|
||||||
connect(plainWpsEdit->document(),SIGNAL(modificationChanged(bool)),SLOT(slotPlainDocModChanged(bool)));
|
connect(plainWpsEdit->textEdit()->document(),SIGNAL(modificationChanged(bool)),SLOT(slotPlainDocModChanged(bool)));
|
||||||
|
|
||||||
connect(&wpsState, SIGNAL(stateChanged(wpsstate)), drawer, SLOT(slotWpsStateChanged(wpsstate)));
|
connect(&wpsState, SIGNAL(stateChanged(wpsstate)), drawer, SLOT(slotWpsStateChanged(wpsstate)));
|
||||||
connect(&trackState, SIGNAL(stateChanged(trackstate)), drawer, SLOT(slotTrackStateChanged(trackstate)));
|
connect(&trackState, SIGNAL(stateChanged(trackstate)), drawer, SLOT(slotTrackStateChanged(trackstate)));
|
||||||
|
|
@ -124,17 +126,23 @@ void QWpsEditorWindow::slotOpenWps() {
|
||||||
DEBUGF1(tr("File wasn't chosen"));
|
DEBUGF1(tr("File wasn't chosen"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_propertyEditor->setEnabled(true);
|
scrollingLine = -1;
|
||||||
drawer->WpsInit(wpsfile);
|
drawer->WpsInit(wpsfile);
|
||||||
plainWpsEdit->clear();
|
plainWpsEdit->textEdit()->clear();
|
||||||
plainWpsEdit->append(drawer->wpsString());
|
plainWpsEdit->textEdit()->append(drawer->wpsString());
|
||||||
trackState.setAlbum(trackState.album()); ////updating property editor
|
postWpsUpdate();
|
||||||
actGroupAudios->setEnabled(true);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWpsEditorWindow::logMsg(QString s) {
|
void QWpsEditorWindow::logMsg(QString s) {
|
||||||
logEdit->append(s);
|
logEdit->append(s);
|
||||||
|
// check for error line:
|
||||||
|
if (s.contains("ERR: Failed parsing on line ")) {
|
||||||
|
QRegExp error("\\d+");
|
||||||
|
if (error.indexIn(s) != -1) {
|
||||||
|
scrollingLine = error.cap(0).toInt();
|
||||||
|
plainWpsEdit->markLine(scrollingLine);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWpsEditorWindow::slotVerboseLevel() {
|
void QWpsEditorWindow::slotVerboseLevel() {
|
||||||
|
|
@ -146,18 +154,18 @@ void QWpsEditorWindow::slotVerboseLevel() {
|
||||||
|
|
||||||
void QWpsEditorWindow::slotUpdatePlainWps() {
|
void QWpsEditorWindow::slotUpdatePlainWps() {
|
||||||
DEBUGF1(tr("Updating WPS"));
|
DEBUGF1(tr("Updating WPS"));
|
||||||
plainWpsEdit->document()->setModified(false);
|
scrollingLine = -1;
|
||||||
drawer->WpsInit(plainWpsEdit->toPlainText(),false);
|
drawer->WpsInit(plainWpsEdit->textEdit()->toPlainText(),false);
|
||||||
m_propertyEditor->setEnabled(true);
|
postWpsUpdate();
|
||||||
actGroupAudios->setEnabled(true);
|
|
||||||
trackState.setAlbum(trackState.album()); //updating property editor
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWpsEditorWindow::slotPlainDocModChanged(bool changed) {
|
void QWpsEditorWindow::slotPlainDocModChanged(bool changed) {
|
||||||
if (changed)
|
if (changed) {
|
||||||
dockPlainWps->setWindowTitle(tr("PlainWps*"));
|
dockPlainWps->setWindowTitle(tr("PlainWps*"));
|
||||||
else
|
plainWpsEdit->markLine(-1);
|
||||||
|
} else {
|
||||||
dockPlainWps->setWindowTitle(tr("PlainWps"));
|
dockPlainWps->setWindowTitle(tr("PlainWps"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void QWpsEditorWindow::slotSetTarget(const QString & target) {
|
void QWpsEditorWindow::slotSetTarget(const QString & target) {
|
||||||
if (drawer->setTarget(target)) {
|
if (drawer->setTarget(target)) {
|
||||||
|
|
@ -169,5 +177,15 @@ void QWpsEditorWindow::slotSetTarget(const QString & target) {
|
||||||
slotUpdatePlainWps();
|
slotUpdatePlainWps();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QWpsEditorWindow::postWpsUpdate() {
|
||||||
|
m_propertyEditor->setEnabled(true);
|
||||||
|
actGroupAudios->setEnabled(true);
|
||||||
|
trackState.setAlbum(trackState.album()); ////updating property editor
|
||||||
|
plainWpsEdit->markLine(scrollingLine);
|
||||||
|
plainWpsEdit->textEdit()->document()->setModified(false);
|
||||||
|
plainWpsEdit->scrolltoLine(scrollingLine);
|
||||||
|
scrollingLine = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,10 @@ class QWpsEditorWindow : public QMainWindow, public Ui::MainWindow {
|
||||||
QActionGroup *actGroupTargets;
|
QActionGroup *actGroupTargets;
|
||||||
QSignalMapper *targetsSignalMapper;
|
QSignalMapper *targetsSignalMapper;
|
||||||
|
|
||||||
|
int scrollingLine;
|
||||||
protected:
|
protected:
|
||||||
void connectActions();
|
void connectActions();
|
||||||
|
void postWpsUpdate();
|
||||||
public:
|
public:
|
||||||
QWpsEditorWindow( QWidget * parent = 0, Qt::WFlags f = 0 );
|
QWpsEditorWindow( QWidget * parent = 0, Qt::WFlags f = 0 );
|
||||||
void logMsg(QString s);
|
void logMsg(QString s);
|
||||||
|
|
@ -74,3 +76,4 @@ signals:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,23 +12,14 @@
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string>WPS Editor</string>
|
<string>WPS Editor</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget" >
|
<widget class="QWidget" name="centralwidget" />
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>262</x>
|
|
||||||
<y>19</y>
|
|
||||||
<width>340</width>
|
|
||||||
<height>346</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenuBar" name="menubar" >
|
<widget class="QMenuBar" name="menubar" >
|
||||||
<property name="geometry" >
|
<property name="geometry" >
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>882</width>
|
<width>882</width>
|
||||||
<height>19</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile" >
|
<widget class="QMenu" name="menuFile" >
|
||||||
|
|
@ -57,25 +48,8 @@
|
||||||
<addaction name="menuPlay" />
|
<addaction name="menuPlay" />
|
||||||
<addaction name="menuTarget" />
|
<addaction name="menuTarget" />
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar" >
|
<widget class="QStatusBar" name="statusbar" />
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>650</y>
|
|
||||||
<width>882</width>
|
|
||||||
<height>19</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QDockWidget" name="dockPlainWps" >
|
<widget class="QDockWidget" name="dockPlainWps" >
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>371</y>
|
|
||||||
<width>882</width>
|
|
||||||
<height>279</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize" >
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
|
|
@ -89,25 +63,7 @@
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QWidget" name="dockWidgetContents_3" >
|
<widget class="QWidget" name="dockWidgetContents_3" >
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>882</width>
|
|
||||||
<height>259</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2" >
|
<layout class="QGridLayout" name="gridLayout_2" >
|
||||||
<item rowspan="2" row="0" column="0" >
|
|
||||||
<widget class="QTextEdit" name="plainWpsEdit" >
|
|
||||||
<property name="autoFillBackground" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" >
|
<item row="0" column="1" >
|
||||||
<widget class="QPushButton" name="btnUpdatePlainWps" >
|
<widget class="QPushButton" name="btnUpdatePlainWps" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
|
|
@ -128,18 +84,26 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item rowspan="2" row="0" column="0" >
|
||||||
|
<widget class="NumberedTextView" name="plainWpsEdit" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||||
|
<horstretch>2</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape" >
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow" >
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QDockWidget" name="m_dockWidget" >
|
<widget class="QDockWidget" name="m_dockWidget" >
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>19</y>
|
|
||||||
<width>256</width>
|
|
||||||
<height>346</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string>Property Editor</string>
|
<string>Property Editor</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -150,25 +114,9 @@
|
||||||
<property name="enabled" >
|
<property name="enabled" >
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>256</width>
|
|
||||||
<height>326</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QDockWidget" name="dockWidget" >
|
<widget class="QDockWidget" name="dockWidget" >
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>608</x>
|
|
||||||
<y>19</y>
|
|
||||||
<width>274</width>
|
|
||||||
<height>346</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize" >
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
|
|
@ -182,14 +130,6 @@
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QWidget" name="dockWidgetContents" >
|
<widget class="QWidget" name="dockWidgetContents" >
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>274</width>
|
|
||||||
<height>326</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout" >
|
<layout class="QGridLayout" name="gridLayout" >
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QTextEdit" name="logEdit" >
|
<widget class="QTextEdit" name="logEdit" >
|
||||||
|
|
@ -257,6 +197,12 @@
|
||||||
<extends>QTreeView</extends>
|
<extends>QTreeView</extends>
|
||||||
<header>QPropertyEditorWidget.h</header>
|
<header>QPropertyEditorWidget.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>NumberedTextView</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>numberedtextview.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue