UI improvement on the Draw-Figures Tab
parent
145bf8c688
commit
028190bc3d
|
@ -1,5 +1,14 @@
|
|||
#include "drawmapfigure.h"
|
||||
|
||||
QStringList DrawMapFigure::figuresList = QStringList() << QT_TR_NOOP("Unknown")
|
||||
<< QT_TR_NOOP("Arrow")
|
||||
<< QT_TR_NOOP("Circle")
|
||||
<< QT_TR_NOOP("Ellipse")
|
||||
<< QT_TR_NOOP("Line")
|
||||
<< QT_TR_NOOP("Point")
|
||||
<< QT_TR_NOOP("Rectangle")
|
||||
<< QT_TR_NOOP("Text");
|
||||
|
||||
DrawMapFigure::DrawMapFigure(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
|
@ -18,9 +27,8 @@ DrawMapFigure::DrawMapFigure(const QString &str, QObject *parent) :
|
|||
QString params = match.captured("params");
|
||||
|
||||
color.setNamedColor(params.section(' ', 1, 1));
|
||||
bool ok;
|
||||
figure = getFigure(match.captured("type"));
|
||||
if(color.isValid() && ok){
|
||||
if(color.isValid()){
|
||||
switch (figure) {
|
||||
case Text:
|
||||
//parse text and fall through for point
|
||||
|
@ -143,12 +151,7 @@ QColor DrawMapFigure::getColor() const
|
|||
|
||||
QStringList DrawMapFigure::getFigureList()
|
||||
{
|
||||
QMetaEnum metaEnum = QMetaEnum::fromType<Figure>();
|
||||
QStringList list;
|
||||
for(int i =0; i<metaEnum.keyCount();i++){
|
||||
list << metaEnum.key(i);
|
||||
}
|
||||
return list;
|
||||
return figuresList;
|
||||
}
|
||||
|
||||
void DrawMapFigure::setFigure(const Figure &value)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
class DrawMapFigure : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Figure{
|
||||
Unknown,
|
||||
|
@ -100,7 +100,8 @@ protected:
|
|||
QColor color;
|
||||
QMetaEnum metaFigure = QMetaEnum::fromType<Figure>();
|
||||
private:
|
||||
|
||||
Q_OBJECT
|
||||
static QStringList figuresList;
|
||||
};
|
||||
|
||||
#endif // DRAWMAPFIGURE_H
|
||||
|
|
|
@ -6,14 +6,7 @@ DrawMapFigureTableModel::DrawMapFigureTableModel(QObject *parent)
|
|||
: QAbstractTableModel(parent)
|
||||
{
|
||||
list = new QList<DrawMapFigure *>;
|
||||
header <<"Figure"<<"Use image coordinates"<<"Point"<<"Geometry"<<"Color"<<"Text";
|
||||
}
|
||||
|
||||
DrawMapFigureTableModel::DrawMapFigureTableModel(QList<DrawMapFigure *> *list, QObject *parent)
|
||||
: QAbstractTableModel(parent)
|
||||
{
|
||||
this->list = list;
|
||||
header <<"Figure"<<"Use image coordinates"<<"Point"<<"Geometry"<<"Color"<<"Text";
|
||||
header <<tr("Figure")<<tr("Coordinates")<<tr("Point")<<tr("Geometry")<<tr("Color")<<tr("Text");
|
||||
}
|
||||
|
||||
QVariant DrawMapFigureTableModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
|
@ -97,13 +90,18 @@ QVariant DrawMapFigureTableModel::data(const QModelIndex &index, int role) const
|
|||
break;
|
||||
|
||||
case 1:
|
||||
if(role == Qt::EditRole){
|
||||
return item->getUseImageCoordinates();
|
||||
}
|
||||
else {
|
||||
return item->getUseImageCoordinates() ? "Image (x,y)" : "Minetest (x,z)";
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
return (item->requiresPoint()) ? QString("(%1,%2)").arg(p.x()).arg(p.y()) : QVariant();
|
||||
break;
|
||||
case 3:
|
||||
return item->requiresGeometry() ? item->getGeometry()->getString() : QVariant();
|
||||
return item->requiresGeometry() ? item->getGeometry()->getString(Geometry::FormatKeep) : QVariant();
|
||||
break;
|
||||
case 4:
|
||||
return item->getColor();
|
||||
|
@ -121,6 +119,9 @@ QVariant DrawMapFigureTableModel::data(const QModelIndex &index, int role) const
|
|||
else if(role == Qt::DecorationRole && col==4){
|
||||
return item->getColor();
|
||||
}
|
||||
else if(role == Qt::CheckStateRole && col ==1){
|
||||
return item->getUseImageCoordinates()? Qt::Checked : Qt::Unchecked;
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
@ -156,6 +157,12 @@ bool DrawMapFigureTableModel::setData(const QModelIndex &index, const QVariant &
|
|||
emit dataChanged(index, index, QVector<int>() << role);
|
||||
return true;
|
||||
}
|
||||
else if( index.isValid() && role == Qt::CheckStateRole &&index.column()==1){
|
||||
DrawMapFigure *item = list->at(index.row());
|
||||
item->setUseImageCoordinates(value.toInt() == Qt::Checked);
|
||||
emit dataChanged(index, index, QVector<int>() << role);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -169,7 +176,7 @@ Qt::ItemFlags DrawMapFigureTableModel::flags(const QModelIndex &index) const
|
|||
if(col == 0)
|
||||
flag |= Qt::ItemIsEnabled|Qt::ItemIsEditable;
|
||||
else if(col == 1)
|
||||
flag |= Qt::ItemIsEditable;
|
||||
flag |= Qt::ItemIsUserCheckable;
|
||||
else if (col == 2 && item->requiresPoint())
|
||||
flag |= Qt::ItemIsEditable;
|
||||
else if (col == 3 && item->requiresGeometry())
|
||||
|
|
|
@ -1,248 +0,0 @@
|
|||
#include "drawmapfiguretablemodel.h"
|
||||
|
||||
#include <QBrush>
|
||||
|
||||
DrawMapFigureTableModel::DrawMapFigureTableModel(QObject *parent)
|
||||
: QAbstractTableModel(parent)
|
||||
{
|
||||
list = new QList<DrawMapFigure *>;
|
||||
header <<"Figure"<<"Use image coordinates"<<"Point"<<"Geometry"<<"Color"<<"Text";
|
||||
}
|
||||
|
||||
DrawMapFigureTableModel::DrawMapFigureTableModel(QList<DrawMapFigure *> *list, QObject *parent)
|
||||
: QAbstractTableModel(parent)
|
||||
{
|
||||
this->list = list;
|
||||
header <<"Figure"<<"Use image coordinates"<<"Point"<<"Geometry"<<"Color"<<"Text";
|
||||
}
|
||||
|
||||
QVariant DrawMapFigureTableModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (role == Qt::DisplayRole && orientation == Qt::Horizontal && section <= header.size())
|
||||
{
|
||||
return header[section];
|
||||
}
|
||||
else if(role == Qt::DisplayRole && orientation == Qt::Vertical){
|
||||
return section+1;
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
bool DrawMapFigureTableModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role)
|
||||
{
|
||||
if (value != headerData(section, orientation, role) && role == Qt::DisplayRole && orientation == Qt::Horizontal)
|
||||
{
|
||||
header[section] = value.toString();
|
||||
emit headerDataChanged(orientation, section, section);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
int DrawMapFigureTableModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
if (parent.isValid())
|
||||
return 0;
|
||||
|
||||
|
||||
return list->size();
|
||||
}
|
||||
|
||||
int DrawMapFigureTableModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
if (parent.isValid())
|
||||
return 0;
|
||||
|
||||
return header.size();
|
||||
// FIXME: Implement me!
|
||||
}
|
||||
|
||||
QVariant DrawMapFigureTableModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (index.isValid()){
|
||||
int row = index.row();
|
||||
int col = index.column();
|
||||
DrawMapFigure *item = list->at(row);
|
||||
QPoint p = item->getPoint();
|
||||
QMetaEnum metaEnum = QMetaEnum::fromType<DrawMapFigure::Figure>();
|
||||
if(role == Qt::DecorationRole && col ==0)
|
||||
{
|
||||
return item->getIcon();
|
||||
}
|
||||
else if(role == Qt::BackgroundRole)
|
||||
{
|
||||
if(item->getFigure()==DrawMapFigure::Unknown){
|
||||
return QBrush(Qt::red);
|
||||
}
|
||||
else if(col == 2 && !item->requiresPoint()){
|
||||
return QBrush(Qt::lightGray);
|
||||
}
|
||||
else if (col == 3 && !item->requiresGeometry()){
|
||||
return QBrush(Qt::lightGray);
|
||||
}
|
||||
else if(col == 5 && !item->requiresText()){
|
||||
return QBrush(Qt::lightGray);
|
||||
}
|
||||
}
|
||||
else if(role == Qt::EditRole ||role == Qt::DisplayRole){
|
||||
|
||||
switch(col){
|
||||
case 0:
|
||||
return (role == Qt::EditRole) ? QVariant(item->getFigure()) : QString(metaEnum.key(item->getFigure()));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
return item->getUseImageCoordinates();
|
||||
break;
|
||||
case 2:
|
||||
return (item->requiresPoint()) ? QString("(%1,%2)").arg(p.x()).arg(p.y()) : QVariant();
|
||||
break;
|
||||
case 3:
|
||||
return item->requiresGeometry() ? item->getGeometry()->getString() : QVariant();
|
||||
break;
|
||||
case 4:
|
||||
return item->getColor();
|
||||
break;
|
||||
case 5:
|
||||
return item->getText();
|
||||
break;
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
// FIXME: Implement me!
|
||||
return QVariant();
|
||||
}
|
||||
else if(role == Qt::DecorationRole && col==4){
|
||||
return item->getColor();
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
bool DrawMapFigureTableModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
if (index.isValid() && role == Qt::EditRole && data(index, role) != value) {
|
||||
int row = index.row();
|
||||
int col = index.column();
|
||||
DrawMapFigure *item = list->at(row);
|
||||
switch(col){
|
||||
case 0:
|
||||
item->setFigure(value.toInt());
|
||||
break;
|
||||
case 1:
|
||||
item->setUseImageCoordinates(value.toBool());
|
||||
break;
|
||||
case 2:
|
||||
item->setPoint(value.toString());
|
||||
break;
|
||||
case 3:
|
||||
item->getGeometry()->set(value.toString());
|
||||
break;
|
||||
case 4:
|
||||
item->setColor(QColor(value.toString()));
|
||||
break;
|
||||
case 5:
|
||||
item->setText(value.toString());
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// FIXME: Implement me!
|
||||
emit dataChanged(index, index, QVector<int>() << role);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Qt::ItemFlags DrawMapFigureTableModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return Qt::NoItemFlags;
|
||||
Qt::ItemFlags flag = QAbstractItemModel::flags(index);
|
||||
int col = index.column();
|
||||
DrawMapFigure *item = list->at(index.row());
|
||||
if(col == 0)
|
||||
flag |= Qt::ItemIsEnabled|Qt::ItemIsEditable;
|
||||
else if(col == 1)
|
||||
flag |= Qt::ItemIsEditable;
|
||||
else if (col == 2 && item->requiresPoint())
|
||||
flag |= Qt::ItemIsEditable;
|
||||
else if (col == 3 && item->requiresGeometry())
|
||||
flag |= Qt::ItemIsEditable;
|
||||
else if (col == 4)
|
||||
flag |= Qt::ItemIsEditable;
|
||||
else if(col == 5 && item->requiresText())
|
||||
flag |= Qt::ItemIsEditable;
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
bool DrawMapFigureTableModel::insertRows(int position, int count, const QModelIndex &parent)
|
||||
{
|
||||
beginInsertRows(parent, position, position + count - 1);
|
||||
for (int row = 0; row < count; ++row) {
|
||||
list->insert(position, new DrawMapFigure());
|
||||
}
|
||||
endInsertRows();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DrawMapFigureTableModel::insertColumns(int column, int count, const QModelIndex &parent)
|
||||
{
|
||||
beginInsertColumns(parent, column, column + count - 1);
|
||||
// FIXME: Implement me!
|
||||
endInsertColumns();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DrawMapFigureTableModel::removeRows(int position, int count, const QModelIndex &parent)
|
||||
{
|
||||
beginRemoveRows(parent, position, position + count - 1);
|
||||
for (int row = 0; row < count; ++row) {
|
||||
list->removeAt(position);
|
||||
}
|
||||
endRemoveRows();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DrawMapFigureTableModel::removeColumns(int column, int count, const QModelIndex &parent)
|
||||
{
|
||||
beginRemoveColumns(parent, column, column + count - 1);
|
||||
// FIXME: Implement me!
|
||||
endRemoveColumns();
|
||||
return false;
|
||||
}
|
||||
|
||||
QStringList DrawMapFigureTableModel::getStringList() const
|
||||
{
|
||||
QStringList retval;
|
||||
for (int i = 0; i < list->size(); ++i)
|
||||
retval << list->at(i)->getString();
|
||||
return retval;
|
||||
}
|
||||
|
||||
QStringList DrawMapFigureTableModel::getArguments() const
|
||||
{
|
||||
QStringList retval;
|
||||
for (int i = 0; i < list->size(); ++i)
|
||||
retval << list->at(i)->getSplittedString();
|
||||
return retval;
|
||||
}
|
||||
|
||||
void DrawMapFigureTableModel::insertStringList(const QStringList &other)
|
||||
{
|
||||
if(other.length() > 0){
|
||||
int leng = other.length();
|
||||
beginInsertRows(QModelIndex() , list->length(), list->length()+leng - 1);
|
||||
//insertRows(0, other.length(),QModelIndex());
|
||||
for(int i = 0; i < leng; ++i){
|
||||
list->append(new DrawMapFigure(other.at(i)));
|
||||
}
|
||||
endInsertRows();
|
||||
}
|
||||
}
|
|
@ -12,7 +12,6 @@ class DrawMapFigureTableModel : public QAbstractTableModel
|
|||
|
||||
public:
|
||||
explicit DrawMapFigureTableModel(QObject *parent = 0);
|
||||
explicit DrawMapFigureTableModel(QList<DrawMapFigure *> *list, QObject *parent = 0);
|
||||
|
||||
// Header:
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
|
|
20
geometry.cpp
20
geometry.cpp
|
@ -40,7 +40,7 @@ Geometry::Format Geometry::set(QString str)
|
|||
QRegularExpressionMatch match;
|
||||
if(str.isEmpty()){
|
||||
qDebug()<<"format is FormatNone";
|
||||
return FormatNone;
|
||||
format = FormatNone;
|
||||
}
|
||||
else if((match =corners.match(str)).hasMatch()) {
|
||||
qDebug()<<"format is Corners";
|
||||
|
@ -52,7 +52,7 @@ Geometry::Format Geometry::set(QString str)
|
|||
// Order is important here!
|
||||
computeDimensions();
|
||||
computeCenter();
|
||||
return Geometry::Corners;
|
||||
format = Geometry::Corners;
|
||||
}
|
||||
else if((match =centerDimension.match(str)).hasMatch()){
|
||||
qDebug()<<"format is CenterDimensions";
|
||||
|
@ -67,7 +67,7 @@ Geometry::Format Geometry::set(QString str)
|
|||
computeDimensions();
|
||||
computeCenter();
|
||||
}
|
||||
return Geometry::CenterDimensions;
|
||||
format = Geometry::CenterDimensions;
|
||||
}
|
||||
else if((match = cornerDimension.match(str)).hasMatch()){
|
||||
qDebug()<<"format is CornerDimensions";
|
||||
|
@ -82,7 +82,7 @@ Geometry::Format Geometry::set(QString str)
|
|||
computeDimensions();
|
||||
computeCenter();
|
||||
}
|
||||
return Geometry::CornerDimensions;
|
||||
format = Geometry::CornerDimensions;
|
||||
}
|
||||
else if((match = cornerDimensionAlternate.match(str)).hasMatch()){
|
||||
qDebug() << "format is <width>x<height>[<+|-xoffset><+|-yoffset>]";
|
||||
|
@ -99,7 +99,7 @@ Geometry::Format Geometry::set(QString str)
|
|||
computeDimensions();
|
||||
computeCenter();
|
||||
}
|
||||
return Geometry::CenterDimensions;
|
||||
format = Geometry::CenterDimensions;
|
||||
}
|
||||
else if(match.lastCapturedIndex() ==4){
|
||||
qDebug() << "format is CornerDimensions";
|
||||
|
@ -114,15 +114,17 @@ Geometry::Format Geometry::set(QString str)
|
|||
computeDimensions();
|
||||
computeCenter();
|
||||
}
|
||||
return Geometry::CornerDimensions;
|
||||
format = Geometry::CornerDimensions;
|
||||
}
|
||||
else return Geometry::FormatCustom;
|
||||
else format = Geometry::FormatCustom;
|
||||
}
|
||||
else {
|
||||
qDebug()<<"Warning: Could not parse format of string: "<<str;
|
||||
return Geometry::FormatCustom;
|
||||
format = Geometry::FormatCustom;
|
||||
}
|
||||
|
||||
return format;
|
||||
|
||||
}
|
||||
void Geometry::setMax(void)
|
||||
{
|
||||
|
@ -184,6 +186,8 @@ void Geometry::setCorners(int c0x, int c0y, int c1x, int c1y)
|
|||
|
||||
QString Geometry::getString(Geometry::Format format)
|
||||
{
|
||||
if(format == FormatKeep)
|
||||
format = this->format; // Use the preferred format
|
||||
switch (format) {
|
||||
case CenterDimensions:
|
||||
if(center[0]==0 && center[1] ==0)
|
||||
|
|
|
@ -52,6 +52,8 @@ private:
|
|||
void computeCorner1(void);
|
||||
void computeCenter(void); // Depends dimensions to be correct !
|
||||
void computeDimensions(void);
|
||||
|
||||
Format format = FormatNone;
|
||||
};
|
||||
|
||||
#endif // GEOMETRY_H
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
236
mainwindow.ui
236
mainwindow.ui
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
<width>972</width>
|
||||
<height>605</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -28,7 +28,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_genaral">
|
||||
<attribute name="title">
|
||||
|
@ -894,7 +894,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>524</width>
|
||||
<width>653</width>
|
||||
<height>427</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -1955,8 +1955,8 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>513</width>
|
||||
<height>369</height>
|
||||
<width>663</width>
|
||||
<height>374</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
|
@ -2182,15 +2182,109 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
|||
<attribute name="title">
|
||||
<string>Draw figures</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_15">
|
||||
<item row="0" column="1">
|
||||
<widget class="QGroupBox" name="groupBox_8">
|
||||
<property name="title">
|
||||
<string>Properties</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_14">
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_9">
|
||||
<property name="title">
|
||||
<string>Geometry</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||
<item>
|
||||
<widget class="GeometryWidget" name="figure_geometry" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="figure_geometry_apply">
|
||||
<property name="text">
|
||||
<string>Apply</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="figureSelect"/>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="ColorLineEdit" name="figure_color">
|
||||
<property name="text">
|
||||
<string>red</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Figure:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLineEdit" name="figure_point"/>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QCheckBox" name="figureUseImageCoordinates">
|
||||
<property name="text">
|
||||
<string>Use Image Coodinates</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Color: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLineEdit" name="figure_text"/>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Text:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>Point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QGroupBox" name="groupBox_14">
|
||||
<property name="title">
|
||||
<string>Information:</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<widget class="QTextBrowser" name="figureInformation">
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="source">
|
||||
<url>
|
||||
<string>qrc:/doc/drawfigure.html</string>
|
||||
</url>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Elements</string>
|
||||
</property>
|
||||
|
@ -2213,15 +2307,15 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
|||
<widget class="QTableView" name="figures_list">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<horstretch>10</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="dragDropMode">
|
||||
<enum>QAbstractItemView::DragDrop</enum>
|
||||
</property>
|
||||
<property name="defaultDropAction">
|
||||
<enum>Qt::MoveAction</enum>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>460</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
|
@ -2240,110 +2334,6 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Properties</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_14">
|
||||
<item row="3" column="2">
|
||||
<widget class="QLineEdit" name="figure_point"/>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_22">
|
||||
<property name="text">
|
||||
<string>Information: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="figureSelect"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Figure:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="ColorLineEdit" name="figure_color">
|
||||
<property name="text">
|
||||
<string>red</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Color: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QCheckBox" name="figureUseImageCoordinates">
|
||||
<property name="text">
|
||||
<string>Use Image Coodinates</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLineEdit" name="figure_text"/>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Text:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_9">
|
||||
<property name="title">
|
||||
<string>Geometry</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||
<item>
|
||||
<widget class="GeometryWidget" name="figure_geometry" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="figure_geometry_apply">
|
||||
<property name="text">
|
||||
<string>Apply</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>Point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="2">
|
||||
<widget class="QTextBrowser" name="figureInformation">
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="source">
|
||||
<url>
|
||||
<string>qrc:/doc/drawfigure.html</string>
|
||||
</url>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_output">
|
||||
|
@ -2445,7 +2435,7 @@ Nodes higher than this level will not be drawn. This can be used to avoid floati
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<width>972</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
Loading…
Reference in New Issue