git-svn-id: svn://db.shs.com.ru/libs@301 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -980,6 +980,24 @@ void BlockView::centerOn(const QGraphicsItem * item) {
|
||||
}
|
||||
|
||||
|
||||
void BlockView::fitInView(const QRectF & rect, Qt::AspectRatioMode aspectRatioMode) {
|
||||
QGraphicsView::fitInView(rect, aspectRatioMode);
|
||||
nav_target = _nav();
|
||||
}
|
||||
|
||||
|
||||
void BlockView::fitInView(qreal x, qreal y, qreal w, qreal h, Qt::AspectRatioMode aspectRatioMode) {
|
||||
QGraphicsView::fitInView(x, y, w, h, aspectRatioMode);
|
||||
nav_target = _nav();
|
||||
}
|
||||
|
||||
|
||||
void BlockView::fitInView(const QGraphicsItem * item, Qt::AspectRatioMode aspectRatioMode) {
|
||||
QGraphicsView::fitInView(item, aspectRatioMode);
|
||||
nav_target = _nav();
|
||||
}
|
||||
|
||||
|
||||
void BlockView::restoreSelState() {
|
||||
foreach (QGraphicsItem * i, sel_items) {
|
||||
i->setPos(i->data(1001).toPointF());
|
||||
@@ -1521,7 +1539,7 @@ void BlockView::_setThumb(double v) {
|
||||
|
||||
|
||||
void BlockView::_setNav(QRectF v) {
|
||||
fitInView(v);
|
||||
QGraphicsView::fitInView(v);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -78,6 +78,10 @@ public:
|
||||
void centerOn(qreal x, qreal y);
|
||||
void centerOn(const QGraphicsItem * item);
|
||||
|
||||
void fitInView(const QRectF & rect, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio);
|
||||
void fitInView(qreal x, qreal y, qreal w, qreal h, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio);
|
||||
void fitInView(const QGraphicsItem * item, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio);
|
||||
|
||||
protected:
|
||||
void _init();
|
||||
void _updateBack();
|
||||
|
||||
@@ -56,6 +56,7 @@ void _DTSizeItem::assignObject(QGraphicsItem * item) {
|
||||
QGraphicsEllipseItem * iell = qgraphicsitem_cast<QGraphicsEllipseItem*>(cur_item);
|
||||
QGraphicsLineItem * iline = qgraphicsitem_cast<QGraphicsLineItem*>(cur_item);
|
||||
if (irect || iell || iline) {
|
||||
resizeHandles();
|
||||
is_line = qgraphicsitem_cast<QGraphicsLineItem*>(item);
|
||||
for (int i = 0; i < (is_line ? 2 : 8); ++i) {
|
||||
rects[i].setParentItem(item);
|
||||
@@ -115,6 +116,14 @@ void _DTSizeItem::doubleClick() {
|
||||
}
|
||||
|
||||
|
||||
void _DTSizeItem::resizeHandles() {
|
||||
double sz = QApplication::fontMetrics().size(0, "0").height() / 3.;
|
||||
QRectF r(-sz, -sz, sz*2, sz*2);
|
||||
for (int i = 0; i < 8; ++i)
|
||||
rects[i].setRect(r);
|
||||
}
|
||||
|
||||
|
||||
QRectF _DTSizeItem::itemRect(const QGraphicsItem * item) const {
|
||||
if (!cur_item) return QRectF();
|
||||
QGraphicsRectItem * irect = qgraphicsitem_cast<QGraphicsRectItem*>(cur_item);
|
||||
@@ -220,6 +229,22 @@ actions_Z_up(this), actions_Z_top(this), actions_Z_down(this), actions_Z_bottom(
|
||||
ui = new Ui::DrawTools();
|
||||
ui->setupUi(widget_props);
|
||||
widget_props->setEnabled(false);
|
||||
int fh = qMax<int>(QApplication::fontMetrics().size(0, "0").height(), 22);
|
||||
int thick = qMax<int>(qRound(QApplication::fontMetrics().size(0, "0").height() / 15.), 1);
|
||||
QSize sz(fh * 2.5, fh);
|
||||
QStringList styles;
|
||||
styles << tr("NoPen") << tr("Solid") << tr("Dash")
|
||||
<< tr("Dot") << tr("Dash-Dot") << tr("Dash-Dot-Dot");
|
||||
ui->comboLineStyle->setIconSize(sz);
|
||||
for (int i = 0; i < 6; i++) {
|
||||
QPixmap pix(sz);
|
||||
pix.fill();
|
||||
QPainter p(&pix);
|
||||
p.setPen(QPen(Qt::black, thick, (Qt::PenStyle)i));
|
||||
p.drawLine(0, pix.height() / 2, pix.width(), pix.height() / 2);
|
||||
p.end();
|
||||
ui->comboLineStyle->addItem(QIcon(pix), styles[i]);
|
||||
}
|
||||
setAlignCompact(false);
|
||||
menu_hor.addActions(QList<QAction*>() << ui->actionLeft << ui->actionHCenter << ui->actionRight);
|
||||
menu_ver.addActions(QList<QAction*>() << ui->actionTop << ui->actionVCenter << ui->actionBottom);
|
||||
@@ -265,6 +290,7 @@ actions_Z_up(this), actions_Z_top(this), actions_Z_down(this), actions_Z_bottom(
|
||||
connect(ui->spinScale, SIGNAL(editingFinished()), this, SLOT(changeFinished()));
|
||||
connect(ui->comboText, SIGNAL(editTextChanged(QString)), this, SLOT(propertyChanged()));
|
||||
connect(ui->comboText->lineEdit(), SIGNAL(editingFinished()), this, SLOT(changeFinished()));
|
||||
connect(ui->comboLineStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(comboLineStyleChanged()));
|
||||
connect(ui->colorButtonPen, SIGNAL(colorChanged(QColor)), this, SLOT(propertyChanged()));
|
||||
connect(ui->colorButtonPen, SIGNAL(colorChanged(QColor)), this, SLOT(changeFinished()));
|
||||
connect(ui->colorButtonBrush, SIGNAL(colorChanged(QColor)), this, SLOT(propertyChanged()));
|
||||
@@ -414,6 +440,15 @@ QComboBox * DrawTools::textEditCombo() const {
|
||||
return ui->comboText;
|
||||
}
|
||||
|
||||
/*
|
||||
void DrawTools::changeEvent(QEvent * e) {
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
return;
|
||||
}
|
||||
QObject::changeEvent(e);
|
||||
}
|
||||
*/
|
||||
|
||||
QAction * DrawTools::newAction(const QString & text, const QIcon & icon, int type) {
|
||||
QAction * ret = new QAction(icon, text, this);
|
||||
@@ -469,6 +504,7 @@ void DrawTools::blockPropSignals(bool block_) {
|
||||
ui->spinHeight->blockSignals(block_);
|
||||
ui->spinThick->blockSignals(block_);
|
||||
ui->comboText->blockSignals(block_);
|
||||
ui->comboLineStyle->blockSignals(block_);
|
||||
ui->colorButtonPen->blockSignals(block_);
|
||||
ui->colorButtonBrush->blockSignals(block_);
|
||||
ui->actionTop->blockSignals(block_);
|
||||
@@ -608,6 +644,7 @@ void DrawTools::selectionChanged() {
|
||||
ui->colorButtonPen->setColor(ishape->pen().color());
|
||||
ui->colorButtonBrush->setColor(ishape->brush().color());
|
||||
ui->spinThick->setValue(ishape->pen().widthF());
|
||||
ui->comboLineStyle->setCurrentIndex(qMin<int>((int)ishape->pen().style(), ui->comboLineStyle->count() - 1));
|
||||
setPenBrushEnabled(true, true);
|
||||
if (resize_enabled)
|
||||
size_item.assignObject(ishape);
|
||||
@@ -616,6 +653,7 @@ void DrawTools::selectionChanged() {
|
||||
ui->stackedProperties->setCurrentIndex(1);
|
||||
ui->colorButtonPen->setColor(iline->pen().color());
|
||||
ui->spinThick->setValue(iline->pen().widthF());
|
||||
ui->comboLineStyle->setCurrentIndex(qMin<int>((int)iline->pen().style(), ui->comboLineStyle->count() - 1));
|
||||
setPenBrushEnabled(true, false);
|
||||
if (resize_enabled)
|
||||
size_item.assignObject(iline);
|
||||
@@ -690,7 +728,7 @@ void DrawTools::propertyChanged() {
|
||||
iell->setRect(QRectF(iell->rect().topLeft(), QSizeF(ui->spinWidth->value(), ui->spinHeight->value())));
|
||||
}
|
||||
if (ishape) {
|
||||
ishape->setPen(QPen(ui->colorButtonPen->color(), ui->spinThick->value()));
|
||||
ishape->setPen(QPen(ui->colorButtonPen->color(), ui->spinThick->value(), (Qt::PenStyle)ui->comboLineStyle->currentIndex()));
|
||||
ishape->setBrush(ui->colorButtonBrush->color());
|
||||
if (resize_enabled)
|
||||
size_item.assignObject(ishape);
|
||||
@@ -703,6 +741,30 @@ void DrawTools::propertyChanged() {
|
||||
}
|
||||
|
||||
|
||||
void DrawTools::comboLineStyleChanged() {
|
||||
if (!cur_item) return;
|
||||
QGraphicsRectItem * irect = qgraphicsitem_cast<QGraphicsRectItem*>(cur_item);
|
||||
QGraphicsEllipseItem * iell = qgraphicsitem_cast<QGraphicsEllipseItem*>(cur_item);
|
||||
QGraphicsLineItem * iline = qgraphicsitem_cast<QGraphicsLineItem*>(cur_item);
|
||||
if (irect || iell) {
|
||||
QAbstractGraphicsShapeItem * ishape(0);
|
||||
if (irect)
|
||||
ishape = irect;
|
||||
if (iell)
|
||||
ishape = iell;
|
||||
if (ishape) {
|
||||
QPen p(ishape->pen());
|
||||
p.setStyle((Qt::PenStyle)ui->comboLineStyle->currentIndex());
|
||||
ishape->setPen(p);
|
||||
}
|
||||
} else if (iline) {
|
||||
QPen p(iline->pen());
|
||||
p.setStyle((Qt::PenStyle)ui->comboLineStyle->currentIndex());
|
||||
iline->setPen(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DrawTools::buttonImage_clicked() {
|
||||
QGraphicsPixmapItem * pi = qgraphicsitem_cast<QGraphicsPixmapItem * >(cur_item);
|
||||
if (!pi) return;
|
||||
|
||||
@@ -24,6 +24,7 @@ protected:
|
||||
void moveRects();
|
||||
void applyRect();
|
||||
void doubleClick();
|
||||
void resizeHandles();
|
||||
QRectF itemRect(const QGraphicsItem * item) const;
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0) {}
|
||||
@@ -46,7 +47,7 @@ signals:
|
||||
|
||||
namespace Ui {
|
||||
class DrawTools;
|
||||
};
|
||||
}
|
||||
|
||||
class DrawTools: public QObject
|
||||
{
|
||||
@@ -98,6 +99,7 @@ private slots:
|
||||
void selectionChanged();
|
||||
void sizeChanged();
|
||||
void propertyChanged();
|
||||
void comboLineStyleChanged();
|
||||
void changeFinished() {if (cur_item) emit itemEdited(cur_item);}
|
||||
void moveZUpAvailable(bool yes) {actions_Z_up.setEnabled(yes); actions_Z_top.setEnabled(yes);}
|
||||
void moveZDownAvailable(bool yes) {actions_Z_down.setEnabled(yes); actions_Z_bottom.setEnabled(yes);}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>712</width>
|
||||
<height>111</height>
|
||||
<width>863</width>
|
||||
<height>73</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -126,12 +126,6 @@
|
||||
<iconset resource="qad_blockview.qrc">
|
||||
<normaloff>:/icons/align-hor.png</normaloff>:/icons/align-hor.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
@@ -146,12 +140,6 @@
|
||||
<iconset resource="qad_blockview.qrc">
|
||||
<normaloff>:/icons/align-ver.png</normaloff>:/icons/align-ver.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
@@ -432,116 +420,148 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Size: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinWidth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>X</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinHeight">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Width: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="spinThick">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.500000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinWidth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QDoubleSpinBox" name="spinHeight">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Width: </string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="spinThick">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.500000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Thickness: </string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" rowspan="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Style:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QComboBox" name="comboLineStyle"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
@@ -6,16 +6,19 @@ GraphicConf::GraphicConf(QVector<GraphicType> & graphics_, QWidget * parent): QD
|
||||
ui = new Ui::GraphicConf();
|
||||
ui->setupUi(this);
|
||||
QStringList styles;
|
||||
int fh = qMax<int>(fontMetrics().size(0, "0").height(), 22);
|
||||
int thick = qMax<int>(qRound(fontMetrics().size(0, "0").height() / 15.), 1);
|
||||
QSize sz(fh * 2.5, fh);
|
||||
styles << tr("NoPen") << tr("Solid") << tr("Dash")
|
||||
<< tr("Dot") << tr("Dash-Dot") << tr("Dash-Dot-Dot");
|
||||
ui->comboStyleGrid->setIconSize(QSize(60, 22));
|
||||
ui->comboStyleGraphic->setIconSize(QSize(60, 22));
|
||||
ui->cbGraphicNames->setIconSize(QSize(60, 22));
|
||||
ui->comboStyleGrid->setIconSize(sz);
|
||||
ui->comboStyleGraphic->setIconSize(sz);
|
||||
ui->cbGraphicNames->setIconSize(sz);
|
||||
for (int i = 0; i < 6; i++) {
|
||||
QPixmap pix(60, 22);
|
||||
QPixmap pix(sz);
|
||||
pix.fill();
|
||||
QPainter p(&pix);
|
||||
p.setPen(QPen(Qt::black, 1, (Qt::PenStyle)i));
|
||||
p.setPen(QPen(Qt::black, thick, (Qt::PenStyle)i));
|
||||
p.drawLine(0, pix.height() / 2, pix.width(), pix.height() / 2);
|
||||
p.end();
|
||||
ui->comboStyleGraphic->addItem(QIcon(pix), styles[i]);
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>492</width>
|
||||
<height>585</height>
|
||||
<width>500</width>
|
||||
<height>583</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -20,42 +20,12 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Appearance</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
@@ -154,24 +124,6 @@
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QComboBox" name="cbGraphicNames">
|
||||
<property name="sizePolicy">
|
||||
@@ -275,24 +227,6 @@
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
@@ -426,21 +360,6 @@
|
||||
<string>Margins</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="1" column="5">
|
||||
<widget class="QSpinBox" name="spinMarginR">
|
||||
<property name="suffix">
|
||||
|
||||
Reference in New Issue
Block a user