[TD] cleanup and fixes for Centerlines

- merge the flip Ends option to the main dialog
- use a QuantitySpinBox with angular unit for the angle
- store the state of the flipping correctly
- cleanup UI of dialog to avoid vertical whitespace
This commit is contained in:
donovaly
2020-03-19 02:57:25 +01:00
committed by WandererFan
parent c374a1213a
commit 00e5c48b3c
6 changed files with 526 additions and 666 deletions

View File

@@ -98,7 +98,6 @@ set(TechDrawGui_UIC_SRCS
TaskBalloon.ui
TaskCosVertex.ui
TaskCenterLine.ui
TaskCL2Lines.ui
TaskLineDecor.ui
TaskRestoreLines.ui
TaskWeldingSymbol.ui
@@ -189,7 +188,6 @@ SET(TechDrawGui_SRCS
TaskLineDecor.cpp
TaskLineDecor.h
TaskRestoreLines.ui
TaskCL2Lines.ui
TaskWeldingSymbol.ui
TaskWeldingSymbol.cpp
TaskWeldingSymbol.h
@@ -365,7 +363,6 @@ SET(TechDrawGuiTaskDlgs_SRCS
TaskCenterLine.ui
TaskLineDecor.ui
TaskRestoreLines.ui
TaskCL2Lines.ui
TaskWeldingSymbol.ui
SymbolChooser.ui
TaskActiveView.ui

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TechDrawGui::TaskCL2Lines</class>
<widget class="QWidget" name="TechDrawGui::TaskCL2Lines">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>247</width>
<height>65</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>2 Line Parameters</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="cbFlip">
<property name="text">
<string>Flip ends</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -54,7 +54,6 @@
#include <Mod/TechDraw/App/Cosmetic.h>
#include <Mod/TechDraw/Gui/ui_TaskCenterLine.h>
#include <Mod/TechDraw/Gui/ui_TaskCL2Lines.h>
#include "DrawGuiStd.h"
#include "QGVPage.h"
@@ -80,7 +79,6 @@ TaskCenterLine::TaskCenterLine(TechDraw::DrawViewPart* partFeat,
m_basePage(page),
m_createMode(false),
m_edgeName(edgeName),
m_flipped(false),
m_type(0), //0 - Face, 1 - 2 Lines, 2 - 2 points
m_mode(0) //0 - vertical, 1 - horizontal, 2 - aligned
@@ -97,7 +95,6 @@ TaskCenterLine::TaskCenterLine(TechDraw::DrawViewPart* partFeat,
Base::Console().Message("TCL::TCL() - no centerline found\n");
}
m_type = m_cl->m_type;
m_flipped = m_cl->m_flip2Line;
m_mode = m_cl->m_mode;
setUiEdit();
@@ -112,7 +109,6 @@ TaskCenterLine::TaskCenterLine(TechDraw::DrawViewPart* partFeat,
m_basePage(page),
m_createMode(true),
m_subNames(subNames),
m_flipped(false),
m_type(0), //0 - Face, 1 - 2 Lines, 2 - 2 points
m_mode(0) //0 - vertical, 1 - horizontal, 2 - aligned
{
@@ -161,7 +157,6 @@ void TaskCenterLine::changeEvent(QEvent *e)
void TaskCenterLine::setUiPrimary()
{
// Base::Console().Message("TCL::setUiPrimary()\n");
setWindowTitle(QObject::tr("Create Center Line"));
if (m_partFeat != nullptr) {
@@ -172,25 +167,32 @@ void TaskCenterLine::setUiPrimary()
ui->lstSubList->addItem(listItem);
}
}
ui->cpLineColor->setColor(getCenterColor());
ui->dsbWeight->setValue(getCenterWidth());
ui->cboxStyle->setCurrentIndex(getCenterStyle() - 1);
Base::Quantity qVal;
qVal.setUnit(Base::Unit::Length);
qVal.setValue(getExtendBy());
ui->qsbExtend->setValue(qVal);
Base::Quantity qAngle;
qAngle.setUnit(Base::Unit::Angle);
ui->qsbRotate->setValue(qAngle);
int precision = Base::UnitsApi::getDecimals();
ui->dsbRotate->setDecimals(precision);
ui->qsbRotate->setDecimals(precision);
if (m_type == 0) // if face, then aligned is not possible
ui->rbAligned->setEnabled(false);
else
ui->rbAligned->setEnabled(true);
if (m_type == 1) // only if line, feature is enabled
ui->cbFlip->setEnabled(true);
else
ui->cbFlip->setEnabled(false);
}
void TaskCenterLine::setUiEdit()
{
// Base::Console().Message("TCL::setUiEdit()\n");
setWindowTitle(QObject::tr("Edit Center Line"));
if (m_partFeat != nullptr) {
std::string baseName = m_partFeat->getNameInDocument();
@@ -198,25 +200,24 @@ void TaskCenterLine::setUiEdit()
QString listItem = Base::Tools::fromStdString(m_edgeName);
ui->lstSubList->addItem(listItem);
}
ui->cpLineColor->setColor(m_cl->m_format.m_color.asValue<QColor>());
ui->dsbWeight->setValue(m_cl->m_format.m_weight);
ui->cboxStyle->setCurrentIndex(m_cl->m_format.m_style - 1);
int precision = Base::UnitsApi::getDecimals();
ui->dsbRotate->setDecimals(precision);
ui->rbVertical->setChecked(false);
ui->rbHorizontal->setChecked(false);
ui->rbAligned->setChecked(false);
if (m_cl->m_mode == 0) {
if (m_cl->m_mode == 0)
ui->rbVertical->setChecked(true);
} else if (m_cl->m_mode == 1) {
else if (m_cl->m_mode == 1)
ui->rbHorizontal->setChecked(true);
} else if (m_cl->m_mode ==2) {
else if (m_cl->m_mode ==2)
ui->rbAligned->setChecked(true);
}
ui->dsbRotate->setValue(m_cl->m_rotate);
if (m_cl->m_type == 0) // if face, then aligned is not possible
ui->rbAligned->setEnabled(false);
else
ui->rbAligned->setEnabled(true);
Base::Quantity qVal;
qVal.setUnit(Base::Unit::Length);
qVal.setValue(m_cl->m_vShift);
@@ -225,10 +226,22 @@ void TaskCenterLine::setUiEdit()
ui->qsbHorizShift->setValue(qVal);
qVal.setValue(m_cl->m_extendBy);
ui->qsbExtend->setValue(qVal);
if (m_cl->m_type == 0) // if face, then aligned is not possible
ui->rbAligned->setEnabled(false);
Base::Quantity qAngle;
qAngle.setUnit(Base::Unit::Angle);
ui->qsbRotate->setValue(qAngle);
int precision = Base::UnitsApi::getDecimals();
ui->qsbRotate->setDecimals(precision);
ui->qsbRotate->setValue(m_cl->m_rotate);
if (m_cl->m_flip2Line)
ui->cbFlip->setChecked(true);
else
ui->rbAligned->setEnabled(true);
ui->cbFlip->setChecked(false);
if (m_cl->m_type == 1) // only if line, feature is enabled
ui->cbFlip->setEnabled(true);
else
ui->cbFlip->setEnabled(false);
}
//******************************************************************************
@@ -239,7 +252,7 @@ void TaskCenterLine::createCenterLine(void)
// bool vertical = false;
double hShift = ui->qsbHorizShift->rawValue();
double vShift = ui->qsbVertShift->rawValue();
double rotate = ui->dsbRotate->value();
double rotate = ui->qsbRotate->rawValue();
double extendBy = ui->qsbExtend->rawValue();
std::pair<Base::Vector3d, Base::Vector3d> ends;
if (ui->rbVertical->isChecked()) {
@@ -253,13 +266,12 @@ void TaskCenterLine::createCenterLine(void)
TechDraw::CenterLine* cl = CenterLine::CenterLineBuilder(m_partFeat,
m_subNames,
m_mode,
m_flipped);
m_mode);
if (cl != nullptr) {
cl->setShifts(hShift, vShift);
cl->setExtend(extendBy);
cl->setRotate(rotate);
cl->setFlip(m_flipped);
cl->m_flip2Line = ui->cbFlip->checkState();
App::Color ac;
ac.setValue<QColor>(ui->cpLineColor->color());
cl->m_format.m_color = ac;
@@ -293,12 +305,12 @@ void TaskCenterLine::updateCenterLine(void)
m_mode = CenterLine::CLMODE::ALIGNED;
}
m_cl->m_mode = m_mode;
m_cl->m_rotate = ui->dsbRotate->value();
m_cl->m_rotate = ui->qsbRotate->rawValue();
m_cl->m_vShift = ui->qsbVertShift->rawValue();
m_cl->m_hShift = ui->qsbHorizShift->rawValue();
m_cl->m_extendBy = ui->qsbExtend->rawValue();
m_cl->m_type = m_type;
m_cl->m_flip2Line = m_flipped;
m_cl->m_flip2Line = ui->cbFlip->checkState();
m_partFeat->replaceCenterLine(m_cl);
m_partFeat->refreshCLGeoms();
m_partFeat->requestPaint();
@@ -361,12 +373,6 @@ double TaskCenterLine::getExtendBy(void)
return ext;
}
void TaskCenterLine::setFlipped(bool b)
{
// Base::Console().Message("TCL::setFlipped(%d)\n",b);
m_flipped = b;
}
//******************************************************************************
bool TaskCenterLine::accept()
@@ -408,51 +414,6 @@ bool TaskCenterLine::reject()
return false;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
TaskCL2Lines::TaskCL2Lines(TechDrawGui::TaskCenterLine* tcl) :
ui(new Ui_TaskCL2Lines),
m_tcl(tcl)
{
ui->setupUi(this);
connect(ui->cbFlip, SIGNAL(toggled( bool )), this, SLOT(onFlipToggled( bool )));
initUi();
}
TaskCL2Lines::~TaskCL2Lines()
{
delete ui;
}
void TaskCL2Lines::initUi()
{
}
void TaskCL2Lines::onFlipToggled(bool b)
{
// Base::Console().Message("TCL2L::onFlipToggled(%d)\n", b);
m_tcl->setFlipped(b);
}
bool TaskCL2Lines::accept()
{
// Base::Console().Message("TCL2L::accept()\n");
return true;
}
bool TaskCL2Lines::reject()
{
// Base::Console().Message("TCL2L::reject()\n");
return false;
}
void TaskCL2Lines::changeEvent(QEvent *e)
{
if (e->type() == QEvent::LanguageChange) {
ui->retranslateUi(this);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -466,18 +427,6 @@ TaskDlgCenterLine::TaskDlgCenterLine(TechDraw::DrawViewPart* partFeat,
widget->windowTitle(), true, 0);
taskbox->groupLayout()->addWidget(widget);
Content.push_back(taskbox);
cl2Lines = new TaskCL2Lines(widget);
linesBox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/techdraw-2linecenterline"),
cl2Lines->windowTitle(), true, 0);
linesBox->groupLayout()->addWidget(cl2Lines);
Content.push_back(linesBox);
// cl2Points = new TaskCL2Points(widget);
// pointsBox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/techdraw-2pointcenterline"),
// widget->windowTitle(), true, 0);
// pointsBox->groupLayout()->addWidget(cl2Lines);
// Content.push_back(pointsBox);
}
TaskDlgCenterLine::TaskDlgCenterLine(TechDraw::DrawViewPart* partFeat,
@@ -490,18 +439,6 @@ TaskDlgCenterLine::TaskDlgCenterLine(TechDraw::DrawViewPart* partFeat,
widget->windowTitle(), true, 0);
taskbox->groupLayout()->addWidget(widget);
Content.push_back(taskbox);
cl2Lines = new TaskCL2Lines(widget);
linesBox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/techdraw-2linecenterline"),
widget->windowTitle(), true, 0);
linesBox->groupLayout()->addWidget(cl2Lines);
Content.push_back(linesBox);
// cl2Points = new TaskCL2Points(widget);
// pointsBox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/techdraw-2pointcenterline"),
// widget->windowTitle(), true, 0);
// pointsBox->groupLayout()->addWidget(cl2Lines);
// Content.push_back(pointsBox);
}
TaskDlgCenterLine::~TaskDlgCenterLine()

View File

@@ -1,212 +1,180 @@
/***************************************************************************
* Copyright (c) 2019 WandererFan <wandererfan@gmail.com> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* 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., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef TECHDRAWGUI_TASKCENTERLINE_H
#define TECHDRAWGUI_TASKCENTERLINE_H
#include <App/DocumentObject.h>
#include <Base/Vector3D.h>
#include <Gui/TaskView/TaskView.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Mod/TechDraw/Gui/ui_TaskCenterLine.h>
#include <Mod/TechDraw/Gui/ui_TaskCL2Lines.h>
/*#include "QGTracker.h"*/
//TODO: make this a proper enum
#define TRACKERPICK 0
#define TRACKEREDIT 1
#define TRACKERCANCEL 2
#define TRACKERCANCELEDIT 3
#define TRACKERFINISHED 4
#define TRACKERSAVE 5
class Ui_TaskCenterLine;
class Ui_TaskCL2Lines;
namespace App {
class DocumentObject;
}
namespace TechDraw
{
class DrawPage;
class DrawView;
class DrawViewPart;
class CosmeticEdge;
class LineFormat;
}
namespace TechDraw
{
class Face;
}
namespace TechDrawGui
{
class QGVPage;
class QGIView;
class QGIPrimPath;
class MDIViewPage;
class ViewProviderViewPart;
class TaskCenterLine : public QWidget
{
Q_OBJECT
public:
TaskCenterLine(TechDraw::DrawViewPart* baseFeat,
TechDraw::DrawPage* page,
std::vector<std::string> subNames);
TaskCenterLine(TechDraw::DrawViewPart* baseFeat,
TechDraw::DrawPage* page,
std::string edgeName);
~TaskCenterLine();
public Q_SLOTS:
public:
virtual bool accept();
virtual bool reject();
virtual void setCreateMode(bool b) { m_createMode = b; }
virtual bool getCreateMode(void) { return m_createMode; }
void updateTask();
void saveButtons(QPushButton* btnOK,
QPushButton* btnCancel);
void enableTaskButtons(bool b);
void setFlipped(bool b);
protected Q_SLOTS:
protected:
void changeEvent(QEvent *e);
void blockButtons(bool b);
void setUiPrimary(void);
void setUiEdit(void);
void createCenterLine(void);
void create2Lines(void);
void create2Points(void);
void updateCenterLine(void);
void update2Lines(void);
void update2Points(void);
double getCenterWidth();
QColor getCenterColor();
Qt::PenStyle getCenterStyle();
double getExtendBy();
private:
Ui_TaskCenterLine * ui;
TechDraw::DrawViewPart* m_partFeat;
TechDraw::DrawPage* m_basePage;
bool m_createMode;
QPushButton* m_btnOK;
QPushButton* m_btnCancel;
std::vector<std::string> m_subNames;
std::string m_edgeName;
double m_extendBy;
int m_geomIndex;
TechDraw::CenterLine* m_cl;
int m_clIdx;
bool m_flipped;
int m_type;
int m_mode;
};
class TaskCL2Lines : public QWidget
{
Q_OBJECT
public:
TaskCL2Lines(TaskCenterLine* tcl);
~TaskCL2Lines();
public:
virtual bool accept();
virtual bool reject();
protected Q_SLOTS:
void onFlipToggled(bool b);
protected:
void changeEvent(QEvent *e);
void initUi(void);
private:
Ui_TaskCL2Lines* ui;
TechDrawGui::TaskCenterLine* m_tcl;
};
class TaskDlgCenterLine : public Gui::TaskView::TaskDialog
{
Q_OBJECT
public:
TaskDlgCenterLine(TechDraw::DrawViewPart* baseFeat,
TechDraw::DrawPage* page,
std::vector<std::string> subNames);
TaskDlgCenterLine(TechDraw::DrawViewPart* baseFeat,
TechDraw::DrawPage* page,
std::string edgeName);
~TaskDlgCenterLine();
public:
/// is called the TaskView when the dialog is opened
virtual void open();
/// is called by the framework if an button is clicked which has no accept or reject role
virtual void clicked(int);
/// is called by the framework if the dialog is accepted (Ok)
virtual bool accept();
/// is called by the framework if the dialog is rejected (Cancel)
virtual bool reject();
/// is called by the framework if the user presses the help button
virtual void helpRequested() { return;}
virtual bool isAllowedAlterDocument(void) const
{ return false; }
void update();
void modifyStandardButtons(QDialogButtonBox* box);
protected:
private:
TaskCenterLine* widget;
Gui::TaskView::TaskBox* taskbox;
TaskCL2Lines* cl2Lines;
Gui::TaskView::TaskBox* linesBox;
};
} //namespace TechDrawGui
#endif // #ifndef TECHDRAWGUI_TASKCENTERLINE_H
/***************************************************************************
* Copyright (c) 2019 WandererFan <wandererfan@gmail.com> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* 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., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef TECHDRAWGUI_TASKCENTERLINE_H
#define TECHDRAWGUI_TASKCENTERLINE_H
#include <App/DocumentObject.h>
#include <Base/Vector3D.h>
#include <Gui/TaskView/TaskView.h>
#include <Gui/TaskView/TaskDialog.h>
#include <Mod/TechDraw/Gui/ui_TaskCenterLine.h>
/*#include "QGTracker.h"*/
//TODO: make this a proper enum
#define TRACKERPICK 0
#define TRACKEREDIT 1
#define TRACKERCANCEL 2
#define TRACKERCANCELEDIT 3
#define TRACKERFINISHED 4
#define TRACKERSAVE 5
class Ui_TaskCenterLine;
namespace App {
class DocumentObject;
}
namespace TechDraw
{
class DrawPage;
class DrawView;
class DrawViewPart;
class CosmeticEdge;
class LineFormat;
}
namespace TechDraw
{
class Face;
}
namespace TechDrawGui
{
class QGVPage;
class QGIView;
class QGIPrimPath;
class MDIViewPage;
class ViewProviderViewPart;
class TaskCenterLine : public QWidget
{
Q_OBJECT
public:
TaskCenterLine(TechDraw::DrawViewPart* baseFeat,
TechDraw::DrawPage* page,
std::vector<std::string> subNames);
TaskCenterLine(TechDraw::DrawViewPart* baseFeat,
TechDraw::DrawPage* page,
std::string edgeName);
~TaskCenterLine();
public Q_SLOTS:
public:
virtual bool accept();
virtual bool reject();
virtual void setCreateMode(bool b) { m_createMode = b; }
virtual bool getCreateMode(void) { return m_createMode; }
void updateTask();
void saveButtons(QPushButton* btnOK,
QPushButton* btnCancel);
void enableTaskButtons(bool b);
void setFlipped(bool b);
protected Q_SLOTS:
protected:
void changeEvent(QEvent *e);
void blockButtons(bool b);
void setUiPrimary(void);
void setUiEdit(void);
void createCenterLine(void);
void create2Lines(void);
void create2Points(void);
void updateCenterLine(void);
void update2Lines(void);
void update2Points(void);
double getCenterWidth();
QColor getCenterColor();
Qt::PenStyle getCenterStyle();
double getExtendBy();
private:
Ui_TaskCenterLine * ui;
TechDraw::DrawViewPart* m_partFeat;
TechDraw::DrawPage* m_basePage;
bool m_createMode;
QPushButton* m_btnOK;
QPushButton* m_btnCancel;
std::vector<std::string> m_subNames;
std::string m_edgeName;
double m_extendBy;
int m_geomIndex;
TechDraw::CenterLine* m_cl;
int m_clIdx;
int m_type;
int m_mode;
};
class TaskDlgCenterLine : public Gui::TaskView::TaskDialog
{
Q_OBJECT
public:
TaskDlgCenterLine(TechDraw::DrawViewPart* baseFeat,
TechDraw::DrawPage* page,
std::vector<std::string> subNames);
TaskDlgCenterLine(TechDraw::DrawViewPart* baseFeat,
TechDraw::DrawPage* page,
std::string edgeName);
~TaskDlgCenterLine();
public:
/// is called the TaskView when the dialog is opened
virtual void open();
/// is called by the framework if an button is clicked which has no accept or reject role
virtual void clicked(int);
/// is called by the framework if the dialog is accepted (Ok)
virtual bool accept();
/// is called by the framework if the dialog is rejected (Cancel)
virtual bool reject();
/// is called by the framework if the user presses the help button
virtual void helpRequested() { return;}
virtual bool isAllowedAlterDocument(void) const
{ return false; }
void update();
void modifyStandardButtons(QDialogButtonBox* box);
protected:
private:
TaskCenterLine* widget;
Gui::TaskView::TaskBox* taskbox;
};
} //namespace TechDrawGui
#endif // #ifndef TECHDRAWGUI_TASKCENTERLINE_H

View File

@@ -6,12 +6,12 @@
<rect>
<x>0</x>
<y>0</y>
<width>409</width>
<height>460</height>
<width>380</width>
<height>393</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -29,319 +29,316 @@
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/actions/techdraw-facecenterline.svg</normaloff>:/icons/actions/techdraw-facecenterline.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QFrame" name="frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLineEdit" name="leBaseView">
<property name="enabled">
<bool>false</bool>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Base View</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Elements</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QListWidget" name="lstSubList">
<property name="enabled">
<bool>false</bool>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>100</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QRadioButton" name="rbVertical">
<property name="toolTip">
<string>Top to Bottom line</string>
</property>
<property name="text">
<string>Vertical</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="rbHorizontal">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Left to Right line</string>
</property>
<property name="text">
<string>Horizontal</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QRadioButton" name="rbAligned">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>centerline between
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLineEdit" name="leBaseView">
<property name="enabled">
<bool>false</bool>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Base View</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Elements</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QListWidget" name="lstSubList">
<property name="enabled">
<bool>false</bool>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>100</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QRadioButton" name="rbVertical">
<property name="toolTip">
<string>Top to Bottom line</string>
</property>
<property name="text">
<string>Vertical</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="rbHorizontal">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Left to Right line</string>
</property>
<property name="text">
<string>Horizontal</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QRadioButton" name="rbAligned">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>centerline between
- lines: in equal distance to the lines and with
half of the angle tghe lines have to each other
half of the angle the lines have to each other
- points: in equal distance to the points</string>
</property>
<property name="text">
<string>Aligned</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,3,0,3">
<item row="0" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Shift Horiz</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Shift Vert</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Rotate</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="dsbRotate">
<property name="toolTip">
<string>Rotate line +CCW or -CW</string>
</property>
<property name="minimum">
<double>-360.000000000000000</double>
</property>
<property name="maximum">
<double>360.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="Gui::QuantitySpinBox" name="qsbVertShift" native="true">
<property name="toolTip">
<string>Move line +Up or -Down</string>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Gui::QuantitySpinBox" name="qsbHorizShift" native="true">
<property name="toolTip">
<string>Move line -Left or +Right</string>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::ColorButton" name="cpLineColor">
<property name="color" stdset="0">
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Weight</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="dsbWeight">
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.500000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Style</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="cboxStyle">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Continuous</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/continuous-line.svg</normaloff>:/icons/continuous-line.svg</iconset>
</property>
</item>
<item>
<property name="text">
<string>Dash</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/dash-line.svg</normaloff>:/icons/dash-line.svg</iconset>
</property>
</item>
<item>
<property name="text">
<string>Dot</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/dot-line.svg</normaloff>:/icons/dot-line.svg</iconset>
</property>
</item>
<item>
<property name="text">
<string>DashDot</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/dashDot-line.svg</normaloff>:/icons/dashDot-line.svg</iconset>
</property>
</item>
<item>
<property name="text">
<string>DashDotDot</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/dashDotDot-line.svg</normaloff>:/icons/dashDotDot-line.svg</iconset>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Extend By</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Gui::QuantitySpinBox" name="qsbExtend" native="true">
<property name="toolTip">
<string>Make the line a little longer.</string>
</property>
<property name="unit" stdset="0">
<string>mm</string>
</property>
<property name="value" stdset="0">
<double>3.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="text">
<string>Aligned</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,3,0,3">
<item row="0" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Shift Horiz</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Shift Vert</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Rotate</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::QuantitySpinBox" name="qsbRotate" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="toolTip">
<string>Rotate line +CCW or -CW</string>
</property>
<property name="minimum" stdset="0">
<double>-360.000000000000000</double>
</property>
<property name="maximum" stdset="0">
<double>360.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="Gui::QuantitySpinBox" name="qsbVertShift" native="true">
<property name="toolTip">
<string>Move line +Up or -Down</string>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Gui::QuantitySpinBox" name="qsbHorizShift" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="toolTip">
<string>Move line -Left or +Right</string>
</property>
<property name="unit" stdset="0">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::ColorButton" name="cpLineColor">
<property name="color" stdset="0">
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Weight</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="dsbWeight">
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.500000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Style</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="cboxStyle">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Continuous</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/continuous-line.svg</normaloff>:/icons/continuous-line.svg</iconset>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<property name="text">
<string>Dash</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/dash-line.svg</normaloff>:/icons/dash-line.svg</iconset>
</property>
</item>
<item>
<property name="text">
<string>Dot</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/dot-line.svg</normaloff>:/icons/dot-line.svg</iconset>
</property>
</item>
<item>
<property name="text">
<string>DashDot</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/dashDot-line.svg</normaloff>:/icons/dashDot-line.svg</iconset>
</property>
</item>
<item>
<property name="text">
<string>DashDotDot</string>
</property>
<property name="icon">
<iconset resource="Resources/TechDraw.qrc">
<normaloff>:/icons/dashDotDot-line.svg</normaloff>:/icons/dashDotDot-line.svg</iconset>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Extend By</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Gui::QuantitySpinBox" name="qsbExtend" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="toolTip">
<string>Make the line a little longer.</string>
</property>
<property name="unit" stdset="0">
<string>mm</string>
</property>
<property name="value" stdset="0">
<double>3.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="cbFlip">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Flips endpoints of selected lines for centerline creation,
see the FreeCAD Wiki '2LineCenterLine' for a description</string>
</property>
<property name="text">
<string>Flip Ends</string>
</property>
</widget>
</item>
</layout>

View File

@@ -33,7 +33,6 @@
#include <Mod/TechDraw/Gui/ui_TaskWeldingSymbol.h>
class Ui_TaskWeldingSymbol;
class Ui_TaskCL2Lines;
namespace App {
class DocumentObject;