DrawTools, ui fix (line mode)
This commit is contained in:
@@ -48,7 +48,10 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
# Version
|
# Version
|
||||||
set(QAD_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
||||||
|
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
|
||||||
|
endif()
|
||||||
|
set(QAD_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/qad_version.h")
|
||||||
set_version(QAD
|
set_version(QAD
|
||||||
MAJOR "${_QAD_MAJOR}"
|
MAJOR "${_QAD_MAJOR}"
|
||||||
MINOR "${_QAD_MINOR}"
|
MINOR "${_QAD_MINOR}"
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ void DrawTools::alignClicked() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DrawTools::setTollButtonsEnabled(bool pen, bool brush, bool wid_hei) {
|
void DrawTools::setToolButtonsEnabled(bool pen, bool brush, bool wid_hei) {
|
||||||
ui->labelPen->setEnabled(pen);
|
ui->labelPen->setEnabled(pen);
|
||||||
ui->colorButtonPen->setEnabled(pen);
|
ui->colorButtonPen->setEnabled(pen);
|
||||||
ui->labelBrush->setEnabled(brush);
|
ui->labelBrush->setEnabled(brush);
|
||||||
@@ -620,7 +620,7 @@ void DrawTools::selectionChanged() {
|
|||||||
font_dlg.blockSignals(true);
|
font_dlg.blockSignals(true);
|
||||||
font_dlg.setCurrentFont(itext->font());
|
font_dlg.setCurrentFont(itext->font());
|
||||||
font_dlg.blockSignals(false);
|
font_dlg.blockSignals(false);
|
||||||
setTollButtonsEnabled(true, false, false);
|
setToolButtonsEnabled(true, false, false);
|
||||||
ui->widgetAlign2->setEnabled(false);
|
ui->widgetAlign2->setEnabled(false);
|
||||||
ui->widgetAlign9->setEnabled(false);
|
ui->widgetAlign9->setEnabled(false);
|
||||||
size_item.assignObject(itext);
|
size_item.assignObject(itext);
|
||||||
@@ -631,7 +631,7 @@ void DrawTools::selectionChanged() {
|
|||||||
font_dlg.blockSignals(true);
|
font_dlg.blockSignals(true);
|
||||||
font_dlg.setCurrentFont(iatext->font());
|
font_dlg.setCurrentFont(iatext->font());
|
||||||
font_dlg.blockSignals(false);
|
font_dlg.blockSignals(false);
|
||||||
setTollButtonsEnabled(true, false, false);
|
setToolButtonsEnabled(true, false, false);
|
||||||
foreach (QAction * a, menu_hor.actions()) a->setChecked(false);
|
foreach (QAction * a, menu_hor.actions()) a->setChecked(false);
|
||||||
foreach (QAction * a, menu_ver.actions()) a->setChecked(false);
|
foreach (QAction * a, menu_ver.actions()) a->setChecked(false);
|
||||||
align = iatext->alignment();
|
align = iatext->alignment();
|
||||||
@@ -655,7 +655,7 @@ void DrawTools::selectionChanged() {
|
|||||||
} else if (ipixmap) {
|
} else if (ipixmap) {
|
||||||
ui->stackedProperties->setCurrentIndex(2);
|
ui->stackedProperties->setCurrentIndex(2);
|
||||||
ui->spinScale->setValue(sqrt(ipixmap->transform().determinant()));
|
ui->spinScale->setValue(sqrt(ipixmap->transform().determinant()));
|
||||||
setTollButtonsEnabled(false, false, false);
|
setToolButtonsEnabled(false, false, false);
|
||||||
size_item.assignObject(ipixmap);
|
size_item.assignObject(ipixmap);
|
||||||
} else if (irect || iell) {
|
} else if (irect || iell) {
|
||||||
ui->stackedProperties->setCurrentIndex(1);
|
ui->stackedProperties->setCurrentIndex(1);
|
||||||
@@ -675,7 +675,7 @@ void DrawTools::selectionChanged() {
|
|||||||
ui->colorButtonBrush->setColor(ishape->brush().color());
|
ui->colorButtonBrush->setColor(ishape->brush().color());
|
||||||
ui->spinThick->setValue(ishape->pen().widthF());
|
ui->spinThick->setValue(ishape->pen().widthF());
|
||||||
ui->comboLineStyle->setCurrentIndex(qMin<int>((int)ishape->pen().style(), ui->comboLineStyle->count() - 1));
|
ui->comboLineStyle->setCurrentIndex(qMin<int>((int)ishape->pen().style(), ui->comboLineStyle->count() - 1));
|
||||||
setTollButtonsEnabled(true, true, true);
|
setToolButtonsEnabled(true, true, true);
|
||||||
if (resize_enabled)
|
if (resize_enabled)
|
||||||
size_item.assignObject(ishape);
|
size_item.assignObject(ishape);
|
||||||
}
|
}
|
||||||
@@ -684,7 +684,7 @@ void DrawTools::selectionChanged() {
|
|||||||
ui->colorButtonPen->setColor(iline->pen().color());
|
ui->colorButtonPen->setColor(iline->pen().color());
|
||||||
ui->spinThick->setValue(iline->pen().widthF());
|
ui->spinThick->setValue(iline->pen().widthF());
|
||||||
ui->comboLineStyle->setCurrentIndex(qMin<int>((int)iline->pen().style(), ui->comboLineStyle->count() - 1));
|
ui->comboLineStyle->setCurrentIndex(qMin<int>((int)iline->pen().style(), ui->comboLineStyle->count() - 1));
|
||||||
setTollButtonsEnabled(true, false, false);
|
setToolButtonsEnabled(true, false, false);
|
||||||
if (resize_enabled)
|
if (resize_enabled)
|
||||||
size_item.assignObject(iline);
|
size_item.assignObject(iline);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ protected:
|
|||||||
bool eventFilter(QObject * o, QEvent * e);
|
bool eventFilter(QObject * o, QEvent * e);
|
||||||
|
|
||||||
QAction * newAction(const QString & text, const QIcon & icon, int type);
|
QAction * newAction(const QString & text, const QIcon & icon, int type);
|
||||||
void setTollButtonsEnabled(bool pen, bool brush, bool wid_hei);
|
void setToolButtonsEnabled(bool pen, bool brush, bool wid_hei);
|
||||||
void blockPropSignals(bool block_);
|
void blockPropSignals(bool block_);
|
||||||
void actionAlignTrigger(bool vert, Qt::AlignmentFlag value);
|
void actionAlignTrigger(bool vert, Qt::AlignmentFlag value);
|
||||||
void emitZAvailabe(QGraphicsItem * item = 0);
|
void emitZAvailabe(QGraphicsItem * item = 0);
|
||||||
|
|||||||
@@ -526,22 +526,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<item row="1" column="3">
|
||||||
<widget class="QLabel" name="labelStyle">
|
<widget class="QLabel" name="labelStyle">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -561,6 +545,22 @@
|
|||||||
<item row="1" column="4">
|
<item row="1" column="4">
|
||||||
<widget class="QComboBox" name="comboLineStyle"/>
|
<widget class="QComboBox" name="comboLineStyle"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="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>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user