TD: move to new style connect()
This commit is contained in:
@@ -50,8 +50,8 @@ DlgPageChooser::DlgPageChooser(
|
||||
|
||||
fillList(labels, names);
|
||||
|
||||
connect(ui->bbButtons, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
connect(ui->bbButtons, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
connect(ui->bbButtons, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||
connect(ui->bbButtons, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,8 +48,8 @@ DlgPrefsTechDrawAnnotationImp::DlgPrefsTechDrawAnnotationImp( QWidget* parent )
|
||||
ui->pdsbBalloonKink->setMinimum(0);
|
||||
|
||||
// connect the LineGroup the update the tooltip if index changed
|
||||
connect(ui->pcbLineGroup, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(onLineGroupChanged(int)));
|
||||
connect(ui->pcbLineGroup, qOverload<int>(&QComboBox::currentIndexChanged),
|
||||
this, &DlgPrefsTechDrawAnnotationImp::onLineGroupChanged);
|
||||
}
|
||||
|
||||
DlgPrefsTechDrawAnnotationImp::~DlgPrefsTechDrawAnnotationImp()
|
||||
|
||||
@@ -39,8 +39,8 @@ DlgPrefsTechDrawScaleImp::DlgPrefsTechDrawScaleImp( QWidget* parent )
|
||||
ui->pdsbTemplateMark->setUnit(Base::Unit::Length);
|
||||
ui->pdsbTemplateMark->setMinimum(0);
|
||||
|
||||
connect(ui->cbViewScaleType, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(onScaleTypeChanged(int)));
|
||||
connect(ui->cbViewScaleType, qOverload<int>(&QComboBox::currentIndexChanged),
|
||||
this, &DlgPrefsTechDrawScaleImp::onScaleTypeChanged);
|
||||
}
|
||||
|
||||
DlgPrefsTechDrawScaleImp::~DlgPrefsTechDrawScaleImp()
|
||||
|
||||
@@ -46,13 +46,13 @@ DlgStringListEditor::DlgStringListEditor(const std::vector<std::string> texts, Q
|
||||
fillList(texts);
|
||||
|
||||
connect(ui->lwTexts,
|
||||
SIGNAL(itemActivated(QListWidgetItem*)),
|
||||
&QListWidget::itemActivated,
|
||||
this,
|
||||
SLOT(slotItemActivated(QListWidgetItem*)));
|
||||
connect(ui->pbAdd, SIGNAL(clicked()), this, SLOT(slotAddItem()));
|
||||
connect(ui->pbRemove, SIGNAL(clicked()), this, SLOT(slotRemoveItem()));
|
||||
connect(ui->bbButtons, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
connect(ui->bbButtons, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
&DlgStringListEditor::slotItemActivated);
|
||||
connect(ui->pbAdd, &QPushButton::clicked, this, &DlgStringListEditor::slotAddItem);
|
||||
connect(ui->pbRemove, &QPushButton::clicked, this, &DlgStringListEditor::slotRemoveItem);
|
||||
connect(ui->bbButtons, &QDialogButtonBox::accepted, this, &DlgStringListEditor::accept);
|
||||
connect(ui->bbButtons, &QDialogButtonBox::rejected, this, &DlgStringListEditor::reject);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -92,22 +92,22 @@ MDIViewPage::MDIViewPage(ViewProviderPage* pageVp, Gui::Document* doc, QWidget*
|
||||
setMouseTracking(true);
|
||||
|
||||
m_toggleKeepUpdatedAction = new QAction(tr("Toggle &Keep Updated"), this);
|
||||
connect(m_toggleKeepUpdatedAction, SIGNAL(triggered()), this, SLOT(toggleKeepUpdated()));
|
||||
connect(m_toggleKeepUpdatedAction, &QAction::triggered, this, &MDIViewPage::toggleKeepUpdated);
|
||||
|
||||
m_toggleFrameAction = new QAction(tr("Toggle &Frames"), this);
|
||||
connect(m_toggleFrameAction, SIGNAL(triggered()), this, SLOT(toggleFrame()));
|
||||
connect(m_toggleFrameAction, &QAction::triggered, this, &MDIViewPage::toggleFrame);
|
||||
|
||||
m_exportSVGAction = new QAction(tr("&Export SVG"), this);
|
||||
connect(m_exportSVGAction, SIGNAL(triggered()), this, SLOT(saveSVG()));
|
||||
connect(m_exportSVGAction, &QAction::triggered, this, qOverload<>(&MDIViewPage::saveSVG));
|
||||
|
||||
m_exportDXFAction = new QAction(tr("Export DXF"), this);
|
||||
connect(m_exportDXFAction, SIGNAL(triggered()), this, SLOT(saveDXF()));
|
||||
connect(m_exportDXFAction, &QAction::triggered, this, qOverload<>(&MDIViewPage::saveDXF));
|
||||
|
||||
m_exportPDFAction = new QAction(tr("Export PDF"), this);
|
||||
connect(m_exportPDFAction, SIGNAL(triggered()), this, SLOT(savePDF()));
|
||||
connect(m_exportPDFAction, &QAction::triggered, this, qOverload<>(&MDIViewPage::savePDF));
|
||||
|
||||
m_printAllAction = new QAction(tr("Print All Pages"), this);
|
||||
connect(m_printAllAction, SIGNAL(triggered()), this, SLOT(printAll()));
|
||||
connect(m_printAllAction, &QAction::triggered, this, qOverload<>(&MDIViewPage::printAll));
|
||||
|
||||
isSelectionBlocked = false;
|
||||
|
||||
@@ -127,7 +127,7 @@ void MDIViewPage::setScene(QGSPage* scene, QGVPage* viewWidget)
|
||||
{
|
||||
m_scene = scene;
|
||||
setCentralWidget(viewWidget);//this makes viewWidget a Qt child of MDIViewPage
|
||||
QObject::connect(m_scene, SIGNAL(selectionChanged()), this, SLOT(sceneSelectionChanged()));
|
||||
QObject::connect(scene, &QGSPage::selectionChanged, this, &MDIViewPage::sceneSelectionChanged);
|
||||
}
|
||||
|
||||
void MDIViewPage::setDocumentObject(const std::string& name)
|
||||
@@ -347,7 +347,7 @@ void MDIViewPage::printPreview()
|
||||
printer.setPageOrientation(m_orientation);
|
||||
|
||||
QPrintPreviewDialog dlg(&printer, this);
|
||||
connect(&dlg, SIGNAL(paintRequested(QPrinter*)), this, SLOT(print(QPrinter*)));
|
||||
connect(&dlg, &QPrintPreviewDialog::paintRequested, this, qOverload<QPrinter*>(&MDIViewPage::print));
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
|
||||
@@ -216,20 +216,20 @@ void QGEPath::showMarkers(std::vector<QPointF> points)
|
||||
v->setFlag(QGraphicsItem::ItemIsFocusable, true);
|
||||
v->setParentItem(this);
|
||||
QObject::connect(
|
||||
v, SIGNAL(dragFinished(QPointF, int)),
|
||||
this , SLOT (onDragFinished(QPointF, int))
|
||||
v, &QGMarker::dragFinished,
|
||||
this, &QGEPath::onDragFinished
|
||||
);
|
||||
QObject::connect(
|
||||
v, SIGNAL(dragging(QPointF, int)),
|
||||
this , SLOT (onDragging(QPointF, int))
|
||||
v, &QGMarker::dragging,
|
||||
this, &QGEPath::onDragging
|
||||
);
|
||||
QObject::connect(
|
||||
v, SIGNAL(doubleClick(QPointF, int)),
|
||||
this , SLOT (onDoubleClick(QPointF, int))
|
||||
v, &QGMarker::doubleClick,
|
||||
this, &QGEPath::onDoubleClick
|
||||
);
|
||||
QObject::connect(
|
||||
v, SIGNAL(endEdit()),
|
||||
this , SLOT (onEndEdit())
|
||||
v, &QGMarker::endEdit,
|
||||
this, &QGEPath::onEndEdit
|
||||
);
|
||||
//TODO: double r = getMarkerSize();
|
||||
// v->setRadius(r);
|
||||
|
||||
@@ -97,9 +97,9 @@ QGILeaderLine::QGILeaderLine()
|
||||
setZValue(ZVALUE::DIMENSION);
|
||||
|
||||
QObject::connect(m_editPath,
|
||||
SIGNAL(pointsUpdated(QPointF, std::vector<QPointF>)),
|
||||
&QGEPath::pointsUpdated,
|
||||
this,
|
||||
SLOT(onLineEditFinished(QPointF, std::vector<QPointF>)));
|
||||
&QGILeaderLine::onLineEditFinished);
|
||||
}
|
||||
|
||||
void QGILeaderLine::setLeaderFeature(TechDraw::DrawLeaderLine* feat)
|
||||
|
||||
@@ -315,8 +315,8 @@ void QGIRichAnno::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) {
|
||||
QGridLayout gridLayout(&dialog);
|
||||
gridLayout.addWidget(&richEdit, 0, 0, 1, 1);
|
||||
|
||||
connect(&richEdit, SIGNAL(saveText(QString)), &dialog, SLOT(accept()));
|
||||
connect(&richEdit, SIGNAL(editorFinished(void)), &dialog, SLOT(reject()));
|
||||
connect(&richEdit, &MRichTextEdit::saveText, &dialog, &QDialog::accept);
|
||||
connect(&richEdit, &MRichTextEdit::editorFinished, &dialog, &QDialog::reject);
|
||||
|
||||
if (dialog.exec()) {
|
||||
QString newText = richEdit.toHtml();
|
||||
|
||||
@@ -278,13 +278,13 @@ QGIViewBalloon::QGIViewBalloon()
|
||||
balloonLabel->setPosFromCenter(0, 0);
|
||||
|
||||
// connecting the needed slots and signals
|
||||
QObject::connect(balloonLabel, SIGNAL(dragging(bool)), this, SLOT(balloonLabelDragged(bool)));
|
||||
QObject::connect(balloonLabel, &QGIBalloonLabel::dragging, this, &QGIViewBalloon::balloonLabelDragged);
|
||||
|
||||
QObject::connect(balloonLabel, SIGNAL(dragFinished()), this, SLOT(balloonLabelDragFinished()));
|
||||
QObject::connect(balloonLabel, &QGIBalloonLabel::dragFinished, this, &QGIViewBalloon::balloonLabelDragFinished);
|
||||
|
||||
QObject::connect(balloonLabel, SIGNAL(selected(bool)), this, SLOT(select(bool)));
|
||||
QObject::connect(balloonLabel, &QGIBalloonLabel::selected, this, &QGIViewBalloon::select);
|
||||
|
||||
QObject::connect(balloonLabel, SIGNAL(hover(bool)), this, SLOT(hover(bool)));
|
||||
QObject::connect(balloonLabel, &QGIBalloonLabel::hover, this, &QGIViewBalloon::hover);
|
||||
|
||||
setZValue(ZVALUE::DIMENSION);
|
||||
}
|
||||
|
||||
@@ -499,15 +499,15 @@ QGIViewDimension::QGIViewDimension() : dvDimension(nullptr), hasHover(false), m_
|
||||
dimLines->setStyle(Qt::SolidLine);
|
||||
|
||||
// connecting the needed slots and signals
|
||||
QObject::connect(datumLabel, SIGNAL(dragging(bool)), this, SLOT(datumLabelDragged(bool)));
|
||||
QObject::connect(datumLabel, &QGIDatumLabel::dragging, this, &QGIViewDimension::datumLabelDragged);
|
||||
|
||||
QObject::connect(datumLabel, SIGNAL(dragFinished()), this, SLOT(datumLabelDragFinished()));
|
||||
QObject::connect(datumLabel, &QGIDatumLabel::dragFinished, this, &QGIViewDimension::datumLabelDragFinished);
|
||||
|
||||
QObject::connect(datumLabel, SIGNAL(selected(bool)), this, SLOT(select(bool)));
|
||||
QObject::connect(datumLabel, &QGIDatumLabel::selected, this, &QGIViewDimension::select);
|
||||
|
||||
QObject::connect(datumLabel, SIGNAL(hover(bool)), this, SLOT(hover(bool)));
|
||||
QObject::connect(datumLabel, &QGIDatumLabel::hover, this, &QGIViewDimension::hover);
|
||||
|
||||
QObject::connect(datumLabel, SIGNAL(setPretty(int)), this, SLOT(onPrettyChanged(int)));
|
||||
QObject::connect(datumLabel, &QGIDatumLabel::setPretty, this, &QGIViewDimension::onPrettyChanged);
|
||||
|
||||
setZValue(ZVALUE::DIMENSION);//note: this won't paint dimensions over another View if it stacks
|
||||
//above this Dimension's parent view. need Layers?
|
||||
|
||||
@@ -43,10 +43,10 @@ SymbolChooser::SymbolChooser(QWidget *parent,
|
||||
m_source(source)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->fcSymbolDir, SIGNAL(fileNameChanged(const QString&)),
|
||||
this, SLOT(onDirectoryChanged(const QString&)));
|
||||
connect(ui->lwSymbols, SIGNAL(itemClicked(QListWidgetItem*)), //double click?
|
||||
this, SLOT(onItemClicked(QListWidgetItem*)));
|
||||
connect(ui->fcSymbolDir, &FileChooser::fileNameChanged,
|
||||
this, &SymbolChooser::onDirectoryChanged);
|
||||
connect(ui->lwSymbols, &QListWidget::itemClicked, //double click?
|
||||
this, &SymbolChooser::onItemClicked);
|
||||
|
||||
setUiPrimary();
|
||||
}
|
||||
|
||||
@@ -53,26 +53,26 @@ TaskBalloon::TaskBalloon(QGIViewBalloon *parent, ViewProviderBalloon *balloonVP)
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->qsbShapeScale->setValue(parent->getBalloonFeat()->ShapeScale.getValue());
|
||||
connect(ui->qsbShapeScale, SIGNAL(valueChanged(double)), this, SLOT(onShapeScaleChanged()));
|
||||
connect(ui->qsbShapeScale, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskBalloon::onShapeScaleChanged);
|
||||
|
||||
ui->qsbSymbolScale->setValue(parent->getBalloonFeat()->EndTypeScale.getValue());
|
||||
connect(ui->qsbSymbolScale, SIGNAL(valueChanged(double)), this, SLOT(onEndSymbolScaleChanged()));
|
||||
connect(ui->qsbSymbolScale, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskBalloon::onEndSymbolScaleChanged);
|
||||
|
||||
std::string value = parent->getBalloonFeat()->Text.getValue();
|
||||
QString qs = QString::fromUtf8(value.data(), value.size());
|
||||
ui->leText->setText(qs);
|
||||
ui->leText->selectAll();
|
||||
connect(ui->leText, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged()));
|
||||
connect(ui->leText, &QLineEdit::textChanged, this, &TaskBalloon::onTextChanged);
|
||||
QTimer::singleShot(0, ui->leText, SLOT(setFocus()));
|
||||
|
||||
DrawGuiUtil::loadArrowBox(ui->comboEndSymbol);
|
||||
i = parent->getBalloonFeat()->EndType.getValue();
|
||||
ui->comboEndSymbol->setCurrentIndex(i);
|
||||
connect(ui->comboEndSymbol, SIGNAL(currentIndexChanged(int)), this, SLOT(onEndSymbolChanged()));
|
||||
connect(ui->comboEndSymbol, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskBalloon::onEndSymbolChanged);
|
||||
|
||||
i = parent->getBalloonFeat()->BubbleShape.getValue();
|
||||
ui->comboBubbleShape->setCurrentIndex(i);
|
||||
connect(ui->comboBubbleShape, SIGNAL(currentIndexChanged(int)), this, SLOT(onBubbleShapeChanged()));
|
||||
connect(ui->comboBubbleShape, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskBalloon::onBubbleShapeChanged);
|
||||
|
||||
ui->qsbFontSize->setUnit(Base::Unit::Length);
|
||||
ui->qsbFontSize->setMinimum(0);
|
||||
@@ -86,7 +86,7 @@ TaskBalloon::TaskBalloon(QGIViewBalloon *parent, ViewProviderBalloon *balloonVP)
|
||||
|
||||
if (balloonVP) {
|
||||
ui->textColor->setColor(balloonVP->Color.getValue().asValue<QColor>());
|
||||
connect(ui->textColor, SIGNAL(changed()), this, SLOT(onColorChanged()));
|
||||
connect(ui->textColor, &ColorButton::changed, this, &TaskBalloon::onColorChanged);
|
||||
ui->qsbFontSize->setValue(balloonVP->Fontsize.getValue());
|
||||
ui->comboLineVisible->setCurrentIndex(balloonVP->LineVisible.getValue());
|
||||
ui->qsbLineWidth->setValue(balloonVP->LineWidth.getValue());
|
||||
@@ -94,10 +94,10 @@ TaskBalloon::TaskBalloon(QGIViewBalloon *parent, ViewProviderBalloon *balloonVP)
|
||||
// new balloons have already the preferences BalloonKink length
|
||||
ui->qsbKinkLength->setValue(parent->getBalloonFeat()->KinkLength.getValue());
|
||||
|
||||
connect(ui->qsbFontSize, SIGNAL(valueChanged(double)), this, SLOT(onFontsizeChanged()));
|
||||
connect(ui->comboLineVisible, SIGNAL(currentIndexChanged(int)), this, SLOT(onLineVisibleChanged()));
|
||||
connect(ui->qsbLineWidth, SIGNAL(valueChanged(double)), this, SLOT(onLineWidthChanged()));
|
||||
connect(ui->qsbKinkLength, SIGNAL(valueChanged(double)), this, SLOT(onKinkLengthChanged()));
|
||||
connect(ui->qsbFontSize, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskBalloon::onFontsizeChanged);
|
||||
connect(ui->comboLineVisible, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskBalloon::onLineVisibleChanged);
|
||||
connect(ui->qsbLineWidth, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskBalloon::onLineWidthChanged);
|
||||
connect(ui->qsbKinkLength, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskBalloon::onKinkLengthChanged);
|
||||
}
|
||||
|
||||
TaskBalloon::~TaskBalloon()
|
||||
|
||||
@@ -148,14 +148,18 @@ void TaskCenterLine::setUiConnect()
|
||||
ui->rbAligned->setEnabled(true);
|
||||
|
||||
// now connection
|
||||
connect(ui->cpLineColor, SIGNAL(changed()), this, SLOT(onColorChanged()));
|
||||
connect(ui->dsbWeight, SIGNAL(valueChanged(double)), this, SLOT(onWeightChanged()));
|
||||
connect(ui->cboxStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(onStyleChanged()));
|
||||
connect(ui->qsbVertShift, SIGNAL(valueChanged(double)), this, SLOT(onShiftVertChanged()));
|
||||
connect(ui->qsbHorizShift, SIGNAL(valueChanged(double)), this, SLOT(onShiftHorizChanged()));
|
||||
connect(ui->qsbExtend, SIGNAL(valueChanged(double)), this, SLOT(onExtendChanged()));
|
||||
connect(ui->qsbRotate, SIGNAL(valueChanged(double)), this, SLOT(onRotationChanged()));
|
||||
connect(ui->bgOrientation, SIGNAL(buttonClicked(int)), this, SLOT(onOrientationChanged()));
|
||||
connect(ui->cpLineColor, &ColorButton::changed, this, &TaskCenterLine::onColorChanged);
|
||||
connect(ui->dsbWeight, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskCenterLine::onWeightChanged);
|
||||
connect(ui->cboxStyle, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskCenterLine::onStyleChanged);
|
||||
connect(ui->qsbVertShift, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskCenterLine::onShiftVertChanged);
|
||||
connect(ui->qsbHorizShift, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskCenterLine::onShiftHorizChanged);
|
||||
connect(ui->qsbExtend, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskCenterLine::onExtendChanged);
|
||||
connect(ui->qsbRotate, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskCenterLine::onRotationChanged);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
|
||||
connect(ui->bgOrientation, qOverload<int>(&QButtonGroup::buttonClicked), this, &TaskCenterLine::onOrientationChanged);
|
||||
#else
|
||||
connect(ui->bgOrientation, &QButtonGroup::idClicked, this, &TaskCenterLine::onOrientationChanged);
|
||||
#endif
|
||||
}
|
||||
|
||||
void TaskCenterLine::setUiPrimary()
|
||||
|
||||
@@ -220,24 +220,23 @@ void TaskComplexSection::setUiCommon()
|
||||
editLayout->addWidget(m_viewDirectionWidget);
|
||||
|
||||
|
||||
connect(m_compass, SIGNAL(angleChanged(double)), this, SLOT(slotChangeAngle(double)));
|
||||
connect(m_compass, &CompassWidget::angleChanged, this, &TaskComplexSection::slotChangeAngle);
|
||||
|
||||
connect(ui->pbUp, SIGNAL(clicked(bool)), this, SLOT(onUpClicked()));
|
||||
connect(ui->pbDown, SIGNAL(clicked(bool)), this, SLOT(onDownClicked()));
|
||||
connect(ui->pbRight, SIGNAL(clicked(bool)), this, SLOT(onRightClicked()));
|
||||
connect(ui->pbLeft, SIGNAL(clicked(bool)), this, SLOT(onLeftClicked()));
|
||||
connect(ui->pbUp, &QPushButton::clicked, this, &TaskComplexSection::onUpClicked);
|
||||
connect(ui->pbDown, &QPushButton::clicked, this, &TaskComplexSection::onDownClicked);
|
||||
connect(ui->pbRight, &QPushButton::clicked, this, &TaskComplexSection::onRightClicked);
|
||||
connect(ui->pbLeft, &QPushButton::clicked, this, &TaskComplexSection::onLeftClicked);
|
||||
|
||||
connect(ui->pbUpdateNow, SIGNAL(clicked(bool)), this, SLOT(updateNowClicked()));
|
||||
connect(ui->cbLiveUpdate, SIGNAL(clicked(bool)), this, SLOT(liveUpdateClicked()));
|
||||
connect(ui->pbUpdateNow, &QPushButton::clicked, this, &TaskComplexSection::updateNowClicked);
|
||||
connect(ui->cbLiveUpdate, &QCheckBox::clicked, this, &TaskComplexSection::liveUpdateClicked);
|
||||
|
||||
connect(ui->pbSectionObjects, SIGNAL(clicked()), this,
|
||||
SLOT(onSectionObjectsUseSelectionClicked()));
|
||||
connect(ui->pbProfileObject, SIGNAL(clicked()), this,
|
||||
SLOT(onProfileObjectsUseSelectionClicked()));
|
||||
connect(ui->pbSectionObjects, &QPushButton::clicked, this,
|
||||
&TaskComplexSection::onSectionObjectsUseSelectionClicked);
|
||||
connect(ui->pbProfileObject, &QPushButton::clicked, this,
|
||||
&TaskComplexSection::onProfileObjectsUseSelectionClicked);
|
||||
|
||||
connect(m_compass, SIGNAL(angleChanged(double)), this, SLOT(slotChangeAngle(double)));
|
||||
connect(m_viewDirectionWidget, SIGNAL(valueChanged(Base::Vector3d)), this,
|
||||
SLOT(slotViewDirectionChanged(Base::Vector3d)));
|
||||
connect(m_viewDirectionWidget, &VectorEditWidget::valueChanged, this,
|
||||
&TaskComplexSection::slotViewDirectionChanged);
|
||||
}
|
||||
|
||||
//save the start conditions
|
||||
|
||||
@@ -82,8 +82,8 @@ TaskCosVertex::TaskCosVertex(TechDraw::DrawViewPart* baseFeat,
|
||||
|
||||
setUiPrimary();
|
||||
|
||||
connect(ui->pbTracker, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onTrackerClicked(bool)));
|
||||
connect(ui->pbTracker, &QPushButton::clicked,
|
||||
this, &TaskCosVertex::onTrackerClicked);
|
||||
|
||||
m_trackerMode = QGTracker::TrackerMode::Point;
|
||||
}
|
||||
|
||||
@@ -93,66 +93,66 @@ void TaskCustomizeFormat::setUiEdit()
|
||||
ui->leFormat->setText(Base::Tools::fromStdString(balloonText));
|
||||
}
|
||||
// GD&T
|
||||
connect(ui->pbA01, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA02, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA03, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA04, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA05, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA06, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA07, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA08, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA09, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA10, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA11, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA12, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA13, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA14, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbA01, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA02, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA03, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA04, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA05, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA06, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA07, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA08, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA09, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA10, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA11, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA12, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA13, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbA14, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
// Modifiers
|
||||
connect(ui->pbB01, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB02, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB03, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB04, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB05, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB06, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB07, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB08, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB09, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB10, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB11, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB12, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB13, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB14, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbB01, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB02, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB03, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB04, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB05, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB06, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB07, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB08, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB09, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB10, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB11, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB12, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB13, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbB14, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
// Radius & Diameter
|
||||
connect(ui->pbC01, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbC02, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbC03, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbC04, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbC05, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbC01, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbC02, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbC03, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbC04, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbC05, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
// Angles
|
||||
connect(ui->pbD01, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbD02, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbD03, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbD04, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbD01, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbD02, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbD03, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbD04, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
// Other
|
||||
connect(ui->pbE01, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbE02, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbE03, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbE04, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbE05, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbE06, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbE07, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbE08, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbE09, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbE01, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbE02, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbE03, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbE04, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbE05, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbE06, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbE07, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbE08, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbE09, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
// Greek Letters
|
||||
connect(ui->pbF01, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbF02, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbF03, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbF04, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbF05, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbF06, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbF07, SIGNAL(clicked()), this, SLOT(onSymbolClicked()));
|
||||
connect(ui->pbF01, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbF02, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbF03, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbF04, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbF05, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbF06, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
connect(ui->pbF07, &QPushButton::clicked, this, &TaskCustomizeFormat::onSymbolClicked);
|
||||
|
||||
connect(ui->leFormat, SIGNAL(textChanged(QString)), this, SLOT(onFormatChanged()));
|
||||
connect(ui->leFormat, &QLineEdit::textChanged, this, &TaskCustomizeFormat::onFormatChanged);
|
||||
onFormatChanged();
|
||||
}
|
||||
|
||||
|
||||
@@ -98,29 +98,29 @@ TaskDetail::TaskDetail(TechDraw::DrawViewPart* baseFeat):
|
||||
setUiFromFeat();
|
||||
setWindowTitle(QObject::tr("New Detail View"));
|
||||
|
||||
connect(ui->pbDragger, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onDraggerClicked(bool)));
|
||||
connect(ui->pbDragger, &QPushButton::clicked,
|
||||
this, &TaskDetail::onDraggerClicked);
|
||||
|
||||
// the UI file uses keyboardTracking = false so that a recomputation
|
||||
// will only be triggered when the arrow keys of the spinboxes are used
|
||||
connect(ui->qsbX, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onXEdit()));
|
||||
connect(ui->qsbY, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onYEdit()));
|
||||
connect(ui->qsbRadius, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onRadiusEdit()));
|
||||
connect(ui->cbScaleType, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(onScaleTypeEdit()));
|
||||
connect(ui->qsbScale, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onScaleEdit()));
|
||||
connect(ui->leReference, SIGNAL(editingFinished()),
|
||||
this, SLOT(onReferenceEdit()));
|
||||
connect(ui->qsbX, qOverload<double>(&QuantitySpinBox::valueChanged),
|
||||
this, &TaskDetail::onXEdit);
|
||||
connect(ui->qsbY, qOverload<double>(&QuantitySpinBox::valueChanged),
|
||||
this, &TaskDetail::onYEdit);
|
||||
connect(ui->qsbRadius, qOverload<double>(&QuantitySpinBox::valueChanged),
|
||||
this, &TaskDetail::onRadiusEdit);
|
||||
connect(ui->cbScaleType, qOverload<int>(&QComboBox::currentIndexChanged),
|
||||
this, &TaskDetail::onScaleTypeEdit);
|
||||
connect(ui->qsbScale, qOverload<double>(&QuantitySpinBox::valueChanged),
|
||||
this, &TaskDetail::onScaleEdit);
|
||||
connect(ui->leReference, &QLineEdit::editingFinished,
|
||||
this, &TaskDetail::onReferenceEdit);
|
||||
|
||||
m_ghost = new QGIGhostHighlight();
|
||||
m_vpp->getQGSPage()->addItem(m_ghost);
|
||||
m_ghost->hide();
|
||||
connect(m_ghost, SIGNAL(positionChange(QPointF)),
|
||||
this, SLOT(onHighlightMoved(QPointF)));
|
||||
connect(m_ghost, &QGIGhostHighlight::positionChange,
|
||||
this, &TaskDetail::onHighlightMoved);
|
||||
}
|
||||
|
||||
//edit constructor
|
||||
@@ -178,29 +178,29 @@ TaskDetail::TaskDetail(TechDraw::DrawViewDetail* detailFeat):
|
||||
setUiFromFeat();
|
||||
setWindowTitle(QObject::tr("Edit Detail View"));
|
||||
|
||||
connect(ui->pbDragger, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onDraggerClicked(bool)));
|
||||
connect(ui->pbDragger, &QPushButton::clicked,
|
||||
this, &TaskDetail::onDraggerClicked);
|
||||
|
||||
// the UI file uses keyboardTracking = false so that a recomputation
|
||||
// will only be triggered when the arrow keys of the spinboxes are used
|
||||
connect(ui->qsbX, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onXEdit()));
|
||||
connect(ui->qsbY, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onYEdit()));
|
||||
connect(ui->qsbRadius, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onRadiusEdit()));
|
||||
connect(ui->cbScaleType, SIGNAL(currentIndexChanged(int)),
|
||||
this, SLOT(onScaleTypeEdit()));
|
||||
connect(ui->qsbScale, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(onScaleEdit()));
|
||||
connect(ui->leReference, SIGNAL(editingFinished()),
|
||||
this, SLOT(onReferenceEdit()));
|
||||
connect(ui->qsbX, qOverload<double>(&QuantitySpinBox::valueChanged),
|
||||
this, &TaskDetail::onXEdit);
|
||||
connect(ui->qsbY, qOverload<double>(&QuantitySpinBox::valueChanged),
|
||||
this, &TaskDetail::onYEdit);
|
||||
connect(ui->qsbRadius, qOverload<double>(&QuantitySpinBox::valueChanged),
|
||||
this, &TaskDetail::onRadiusEdit);
|
||||
connect(ui->cbScaleType, qOverload<int>(&QComboBox::currentIndexChanged),
|
||||
this, &TaskDetail::onScaleTypeEdit);
|
||||
connect(ui->qsbScale, qOverload<double>(&QuantitySpinBox::valueChanged),
|
||||
this, &TaskDetail::onScaleEdit);
|
||||
connect(ui->leReference, &QLineEdit::editingFinished,
|
||||
this, &TaskDetail::onReferenceEdit);
|
||||
|
||||
m_ghost = new QGIGhostHighlight();
|
||||
m_vpp->getQGSPage()->addItem(m_ghost);
|
||||
m_ghost->hide();
|
||||
connect(m_ghost, SIGNAL(positionChange(QPointF)),
|
||||
this, SLOT(onHighlightMoved(QPointF)));
|
||||
connect(m_ghost, &QGIGhostHighlight::positionChange,
|
||||
this, &TaskDetail::onHighlightMoved);
|
||||
}
|
||||
|
||||
void TaskDetail::updateTask()
|
||||
|
||||
@@ -53,7 +53,7 @@ TaskDimRepair::TaskDimRepair(TechDraw::DrawViewDimension* inDvd)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->pbSelection, SIGNAL(clicked(bool)), this, SLOT(slotUseSelection()));
|
||||
connect(ui->pbSelection, &QPushButton::clicked, this, &TaskDimRepair::slotUseSelection);
|
||||
|
||||
saveDimState();
|
||||
setUiPrimary();
|
||||
|
||||
@@ -56,7 +56,7 @@ TaskDimension::TaskDimension(QGIViewDimension *parent, ViewProviderDimension *di
|
||||
|
||||
// Tolerancing
|
||||
ui->cbTheoreticallyExact->setChecked(parent->getDimFeat()->TheoreticalExact.getValue());
|
||||
connect(ui->cbTheoreticallyExact, SIGNAL(stateChanged(int)), this, SLOT(onTheoreticallyExactChanged()));
|
||||
connect(ui->cbTheoreticallyExact, &QCheckBox::stateChanged, this, &TaskDimension::onTheoreticallyExactChanged);
|
||||
// if TheoreticalExact disable tolerances
|
||||
if (parent->getDimFeat()->TheoreticalExact.getValue()) {
|
||||
ui->cbEqualTolerance->setDisabled(true);
|
||||
@@ -66,7 +66,7 @@ TaskDimension::TaskDimension(QGIViewDimension *parent, ViewProviderDimension *di
|
||||
ui->leFormatSpecifierUnderTolerance->setDisabled(true);
|
||||
}
|
||||
ui->cbEqualTolerance->setChecked(parent->getDimFeat()->EqualTolerance.getValue());
|
||||
connect(ui->cbEqualTolerance, SIGNAL(stateChanged(int)), this, SLOT(onEqualToleranceChanged()));
|
||||
connect(ui->cbEqualTolerance, &QCheckBox::stateChanged, this, &TaskDimension::onEqualToleranceChanged);
|
||||
// if EqualTolerance overtolernace must not be negative
|
||||
if (parent->getDimFeat()->EqualTolerance.getValue())
|
||||
ui->qsbOvertolerance->setMinimum(0.0);
|
||||
@@ -81,8 +81,8 @@ TaskDimension::TaskDimension(QGIViewDimension *parent, ViewProviderDimension *di
|
||||
}
|
||||
ui->qsbOvertolerance->setValue(parent->getDimFeat()->OverTolerance.getValue());
|
||||
ui->qsbUndertolerance->setValue(parent->getDimFeat()->UnderTolerance.getValue());
|
||||
connect(ui->qsbOvertolerance, SIGNAL(valueChanged(double)), this, SLOT(onOvertoleranceChanged()));
|
||||
connect(ui->qsbUndertolerance, SIGNAL(valueChanged(double)), this, SLOT(onUndertoleranceChanged()));
|
||||
connect(ui->qsbOvertolerance, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskDimension::onOvertoleranceChanged);
|
||||
connect(ui->qsbUndertolerance, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskDimension::onUndertoleranceChanged);
|
||||
// undertolerance is disabled when EqualTolerance is true
|
||||
if (ui->cbEqualTolerance->isChecked()) {
|
||||
ui->qsbUndertolerance->setDisabled(true);
|
||||
@@ -93,45 +93,45 @@ TaskDimension::TaskDimension(QGIViewDimension *parent, ViewProviderDimension *di
|
||||
std::string StringValue = parent->getDimFeat()->FormatSpec.getValue();
|
||||
QString qs = QString::fromUtf8(StringValue.data(), StringValue.size());
|
||||
ui->leFormatSpecifier->setText(qs);
|
||||
connect(ui->leFormatSpecifier, SIGNAL(textChanged(QString)), this, SLOT(onFormatSpecifierChanged()));
|
||||
connect(ui->leFormatSpecifier, &QLineEdit::textChanged, this, &TaskDimension::onFormatSpecifierChanged);
|
||||
ui->cbArbitrary->setChecked(parent->getDimFeat()->Arbitrary.getValue());
|
||||
connect(ui->cbArbitrary, SIGNAL(stateChanged(int)), this, SLOT(onArbitraryChanged()));
|
||||
connect(ui->cbArbitrary, &QCheckBox::stateChanged, this, &TaskDimension::onArbitraryChanged);
|
||||
StringValue = parent->getDimFeat()->FormatSpecOverTolerance.getValue();
|
||||
qs = QString::fromUtf8(StringValue.data(), StringValue.size());
|
||||
ui->leFormatSpecifierOverTolerance->setText(qs);
|
||||
StringValue = parent->getDimFeat()->FormatSpecUnderTolerance.getValue();
|
||||
qs = QString::fromUtf8(StringValue.data(), StringValue.size());
|
||||
ui->leFormatSpecifierUnderTolerance->setText(qs);
|
||||
connect(ui->leFormatSpecifierOverTolerance, SIGNAL(textChanged(QString)), this, SLOT(onFormatSpecifierOverToleranceChanged()));
|
||||
connect(ui->leFormatSpecifierUnderTolerance, SIGNAL(textChanged(QString)), this, SLOT(onFormatSpecifierUnderToleranceChanged()));
|
||||
connect(ui->leFormatSpecifierOverTolerance, &QLineEdit::textChanged, this, &TaskDimension::onFormatSpecifierOverToleranceChanged);
|
||||
connect(ui->leFormatSpecifierUnderTolerance, &QLineEdit::textChanged, this, &TaskDimension::onFormatSpecifierUnderToleranceChanged);
|
||||
ui->cbArbitraryTolerances->setChecked(parent->getDimFeat()->ArbitraryTolerances.getValue());
|
||||
connect(ui->cbArbitraryTolerances, SIGNAL(stateChanged(int)), this, SLOT(onArbitraryTolerancesChanged()));
|
||||
connect(ui->cbArbitraryTolerances, &QCheckBox::stateChanged, this, &TaskDimension::onArbitraryTolerancesChanged);
|
||||
|
||||
// Display Style
|
||||
if (dimensionVP) {
|
||||
ui->cbArrowheads->setChecked(dimensionVP->FlipArrowheads.getValue());
|
||||
connect(ui->cbArrowheads, SIGNAL(stateChanged(int)), this, SLOT(onFlipArrowheadsChanged()));
|
||||
connect(ui->cbArrowheads, &QCheckBox::stateChanged, this, &TaskDimension::onFlipArrowheadsChanged);
|
||||
ui->dimensionColor->setColor(dimensionVP->Color.getValue().asValue<QColor>());
|
||||
connect(ui->dimensionColor, SIGNAL(changed()), this, SLOT(onColorChanged()));
|
||||
connect(ui->dimensionColor, &ColorButton::changed, this, &TaskDimension::onColorChanged);
|
||||
ui->qsbFontSize->setValue(dimensionVP->Fontsize.getValue());
|
||||
ui->qsbFontSize->setUnit(Base::Unit::Length);
|
||||
ui->qsbFontSize->setMinimum(0);
|
||||
connect(ui->qsbFontSize, SIGNAL(valueChanged(double)), this, SLOT(onFontsizeChanged()));
|
||||
connect(ui->qsbFontSize, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskDimension::onFontsizeChanged);
|
||||
ui->comboDrawingStyle->setCurrentIndex(dimensionVP->StandardAndStyle.getValue());
|
||||
connect(ui->comboDrawingStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(onDrawingStyleChanged()));
|
||||
connect(ui->comboDrawingStyle, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskDimension::onDrawingStyleChanged);
|
||||
}
|
||||
|
||||
// Lines
|
||||
ui->rbOverride->setChecked(parent->getDimFeat()->AngleOverride.getValue());
|
||||
connect(ui->rbOverride, SIGNAL(toggled(bool)), this, SLOT(onOverrideToggled()));
|
||||
connect(ui->rbOverride, &QRadioButton::toggled, this, &TaskDimension::onOverrideToggled);
|
||||
ui->dsbDimAngle->setValue(parent->getDimFeat()->LineAngle.getValue());
|
||||
connect(ui->dsbDimAngle, SIGNAL(valueChanged(double)), this, SLOT(onDimAngleChanged()));
|
||||
connect(ui->dsbDimAngle, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskDimension::onDimAngleChanged);
|
||||
ui->dsbExtAngle->setValue(parent->getDimFeat()->ExtensionAngle.getValue());
|
||||
connect(ui->dsbExtAngle, SIGNAL(valueChanged(double)), this, SLOT(onExtAngleChanged()));
|
||||
connect(ui->pbDimUseDefault, SIGNAL(clicked()), this, SLOT(onDimUseDefaultClicked()));
|
||||
connect(ui->pbDimUseSelection, SIGNAL(clicked()), this, SLOT(onDimUseSelectionClicked()));
|
||||
connect(ui->pbExtUseDefault, SIGNAL(clicked()), this, SLOT(onExtUseDefaultClicked()));
|
||||
connect(ui->pbExtUseSelection, SIGNAL(clicked()), this, SLOT(onExtUseSelectionClicked()));
|
||||
connect(ui->dsbExtAngle, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskDimension::onExtAngleChanged);
|
||||
connect(ui->pbDimUseDefault, &QPushButton::clicked, this, &TaskDimension::onDimUseDefaultClicked);
|
||||
connect(ui->pbDimUseSelection, &QPushButton::clicked, this, &TaskDimension::onDimUseSelectionClicked);
|
||||
connect(ui->pbExtUseDefault, &QPushButton::clicked, this, &TaskDimension::onExtUseDefaultClicked);
|
||||
connect(ui->pbExtUseSelection, &QPushButton::clicked, this, &TaskDimension::onExtUseSelectionClicked);
|
||||
|
||||
Gui::Document* doc = m_dimensionVP->getDocument();
|
||||
doc->openCommand("TaskDimension");
|
||||
|
||||
@@ -50,7 +50,7 @@ TaskGeomHatch::TaskGeomHatch(TechDraw::DrawGeomHatch* inHatch, TechDrawGui::View
|
||||
m_createMode(mode)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->fcFile, SIGNAL(fileNameSelected( const QString & )), this, SLOT(onFileChanged(void)));
|
||||
connect(ui->fcFile, &FileChooser::fileNameSelected, this, &TaskGeomHatch::onFileChanged);
|
||||
|
||||
m_source = m_hatch->Source.getValue();
|
||||
getParameters();
|
||||
@@ -70,23 +70,23 @@ void TaskGeomHatch::initUi()
|
||||
} else {
|
||||
Base::Console().Warning("Warning - Pattern name *%s* not found in current PAT File\n", m_name.c_str());
|
||||
}
|
||||
connect(ui->cbName, SIGNAL(currentIndexChanged(int)), this, SLOT(onNameChanged()));
|
||||
connect(ui->cbName, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskGeomHatch::onNameChanged);
|
||||
|
||||
ui->sbScale->setValue(m_scale);
|
||||
ui->sbScale->setSingleStep(0.1);
|
||||
connect(ui->sbScale, SIGNAL(valueChanged(double)), this, SLOT(onScaleChanged()));
|
||||
connect(ui->sbScale, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskGeomHatch::onScaleChanged);
|
||||
ui->sbWeight->setValue(m_weight);
|
||||
ui->sbWeight->setSingleStep(0.1);
|
||||
connect(ui->sbWeight, SIGNAL(valueChanged(double)), this, SLOT(onLineWeightChanged()));
|
||||
connect(ui->sbWeight, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskGeomHatch::onLineWeightChanged);
|
||||
ui->ccColor->setColor(m_color.asValue<QColor>());
|
||||
connect(ui->ccColor, SIGNAL(changed()), this, SLOT(onColorChanged()));
|
||||
connect(ui->ccColor, &ColorButton::changed, this, &TaskGeomHatch::onColorChanged);
|
||||
|
||||
ui->dsbRotation->setValue(m_rotation);
|
||||
connect(ui->dsbRotation, SIGNAL(valueChanged(double)), this, SLOT(onRotationChanged()));
|
||||
connect(ui->dsbRotation, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskGeomHatch::onRotationChanged);
|
||||
ui->dsbOffsetX->setValue(m_offset.x);
|
||||
connect(ui->dsbOffsetX, SIGNAL(valueChanged(double)), this, SLOT(onOffsetChanged()));
|
||||
connect(ui->dsbOffsetX, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskGeomHatch::onOffsetChanged);
|
||||
ui->dsbOffsetY->setValue(m_offset.y);
|
||||
connect(ui->dsbOffsetY, SIGNAL(valueChanged(double)), this, SLOT(onOffsetChanged()));
|
||||
connect(ui->dsbOffsetY, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskGeomHatch::onOffsetChanged);
|
||||
}
|
||||
|
||||
void TaskGeomHatch::onFileChanged()
|
||||
|
||||
@@ -58,12 +58,12 @@ TaskHatch::TaskHatch(TechDraw::DrawViewPart* inDvp, std::vector<std::string> sub
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->fcFile, SIGNAL(fileNameSelected(QString)), this, SLOT(onFileChanged()));
|
||||
connect(ui->sbScale, SIGNAL(valueChanged(double)), this, SLOT(onScaleChanged()));
|
||||
connect(ui->ccColor, SIGNAL(changed()), this, SLOT(onColorChanged()));
|
||||
connect(ui->dsbRotation, SIGNAL(valueChanged(double)), this, SLOT(onRotationChanged()));
|
||||
connect(ui->dsbOffsetX, SIGNAL(valueChanged(double)), this, SLOT(onOffsetChanged()));
|
||||
connect(ui->dsbOffsetY, SIGNAL(valueChanged(double)), this, SLOT(onOffsetChanged()));
|
||||
connect(ui->fcFile, &FileChooser::fileNameSelected, this, &TaskHatch::onFileChanged);
|
||||
connect(ui->sbScale, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskHatch::onScaleChanged);
|
||||
connect(ui->ccColor, &ColorButton::changed, this, &TaskHatch::onColorChanged);
|
||||
connect(ui->dsbRotation, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskHatch::onRotationChanged);
|
||||
connect(ui->dsbOffsetX, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskHatch::onOffsetChanged);
|
||||
connect(ui->dsbOffsetY, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskHatch::onOffsetChanged);
|
||||
setUiPrimary();
|
||||
}
|
||||
|
||||
@@ -78,12 +78,12 @@ TaskHatch::TaskHatch(TechDrawGui::ViewProviderHatch* inVp) :
|
||||
App::DocumentObject* obj = m_hatch->Source.getValue();
|
||||
m_dvp = static_cast<TechDraw::DrawViewPart*>(obj);
|
||||
|
||||
connect(ui->fcFile, SIGNAL(fileNameSelected(QString)), this, SLOT(onFileChanged()));
|
||||
connect(ui->sbScale, SIGNAL(valueChanged(double)), this, SLOT(onScaleChanged()));
|
||||
connect(ui->ccColor, SIGNAL(changed()), this, SLOT(onColorChanged()));
|
||||
connect(ui->dsbRotation, SIGNAL(valueChanged(double)), this, SLOT(onRotationChanged()));
|
||||
connect(ui->dsbOffsetX, SIGNAL(valueChanged(double)), this, SLOT(onOffsetChanged()));
|
||||
connect(ui->dsbOffsetY, SIGNAL(valueChanged(double)), this, SLOT(onOffsetChanged()));
|
||||
connect(ui->fcFile, &FileChooser::fileNameSelected, this, &TaskHatch::onFileChanged);
|
||||
connect(ui->sbScale, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskHatch::onScaleChanged);
|
||||
connect(ui->ccColor, &ColorButton::changed, this, &TaskHatch::onColorChanged);
|
||||
connect(ui->dsbRotation, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskHatch::onRotationChanged);
|
||||
connect(ui->dsbOffsetX, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskHatch::onOffsetChanged);
|
||||
connect(ui->dsbOffsetY, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TaskHatch::onOffsetChanged);
|
||||
|
||||
saveHatchState();
|
||||
setUiEdit();
|
||||
|
||||
@@ -118,10 +118,10 @@ TaskLeaderLine::TaskLeaderLine(TechDrawGui::ViewProviderLeader* leadVP) :
|
||||
-m_lineFeat->Y.getValue(),
|
||||
0.0));
|
||||
|
||||
connect(ui->pbTracker, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onTrackerClicked(bool)));
|
||||
connect(ui->pbCancelEdit, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onCancelEditClicked(bool)));
|
||||
connect(ui->pbTracker, &QPushButton::clicked,
|
||||
this, &TaskLeaderLine::onTrackerClicked);
|
||||
connect(ui->pbCancelEdit, &QPushButton::clicked,
|
||||
this, &TaskLeaderLine::onCancelEditClicked);
|
||||
ui->pbCancelEdit->setEnabled(false);
|
||||
|
||||
saveState();
|
||||
@@ -167,10 +167,10 @@ TaskLeaderLine::TaskLeaderLine(TechDraw::DrawView* baseFeat,
|
||||
|
||||
setUiPrimary();
|
||||
|
||||
connect(ui->pbTracker, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onTrackerClicked(bool)));
|
||||
connect(ui->pbCancelEdit, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onCancelEditClicked(bool)));
|
||||
connect(ui->pbTracker, &QPushButton::clicked,
|
||||
this, &TaskLeaderLine::onTrackerClicked);
|
||||
connect(ui->pbCancelEdit, &QPushButton::clicked,
|
||||
this, &TaskLeaderLine::onCancelEditClicked);
|
||||
ui->pbCancelEdit->setEnabled(false);
|
||||
|
||||
m_trackerMode = QGTracker::TrackerMode::Line;
|
||||
@@ -265,10 +265,10 @@ void TaskLeaderLine::setUiEdit()
|
||||
|
||||
DrawGuiUtil::loadArrowBox(ui->cboxStartSym);
|
||||
ui->cboxStartSym->setCurrentIndex(m_lineFeat->StartSymbol.getValue());
|
||||
connect(ui->cboxStartSym, SIGNAL(currentIndexChanged(int)), this, SLOT(onStartSymbolChanged()));
|
||||
connect(ui->cboxStartSym, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskLeaderLine::onStartSymbolChanged);
|
||||
DrawGuiUtil::loadArrowBox(ui->cboxEndSym);
|
||||
ui->cboxEndSym->setCurrentIndex(m_lineFeat->EndSymbol.getValue());
|
||||
connect(ui->cboxEndSym, SIGNAL(currentIndexChanged(int)), this, SLOT(onEndSymbolChanged()));
|
||||
connect(ui->cboxEndSym, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskLeaderLine::onEndSymbolChanged);
|
||||
|
||||
ui->pbTracker->setText(tr("Edit points"));
|
||||
if (m_vpp->getMDIViewPage()) {
|
||||
@@ -285,10 +285,10 @@ void TaskLeaderLine::setUiEdit()
|
||||
ui->dsbWeight->setValue(m_lineVP->LineWidth.getValue());
|
||||
ui->cboxStyle->setCurrentIndex(m_lineVP->LineStyle.getValue());
|
||||
}
|
||||
connect(ui->cpLineColor, SIGNAL(changed()), this, SLOT(onColorChanged()));
|
||||
connect(ui->cpLineColor, &ColorButton::changed, this, &TaskLeaderLine::onColorChanged);
|
||||
ui->dsbWeight->setMinimum(0);
|
||||
connect(ui->dsbWeight, SIGNAL(valueChanged(double)), this, SLOT(onLineWidthChanged()));
|
||||
connect(ui->cboxStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(onLineStyleChanged()));
|
||||
connect(ui->dsbWeight, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskLeaderLine::onLineWidthChanged);
|
||||
connect(ui->cboxStyle, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskLeaderLine::onLineStyleChanged);
|
||||
}
|
||||
|
||||
void TaskLeaderLine::recomputeFeature()
|
||||
@@ -516,8 +516,8 @@ void TaskLeaderLine::onTrackerClicked(bool clicked)
|
||||
//now what? throw will generate "unknown unhandled exception"
|
||||
} else {
|
||||
m_qgLine = qgLead;
|
||||
connect(qgLead, SIGNAL(editComplete()),
|
||||
this, SLOT(onPointEditComplete()));
|
||||
connect(qgLead, &QGILeaderLine::editComplete,
|
||||
this, &TaskLeaderLine::onPointEditComplete);
|
||||
qgLead->startPathEdit();
|
||||
QString msg = tr("Click and drag markers to adjust leader line");
|
||||
getMainWindow()->statusBar()->show();
|
||||
|
||||
@@ -58,10 +58,10 @@ TaskLineDecor::TaskLineDecor(TechDraw::DrawViewPart* partFeat,
|
||||
getDefaults();
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->cb_Style, SIGNAL(currentIndexChanged(int)), this, SLOT(onStyleChanged(void)));
|
||||
connect(ui->cc_Color, SIGNAL(changed()), this, SLOT(onColorChanged(void)));
|
||||
connect(ui->dsb_Weight, SIGNAL(valueChanged(double)), this, SLOT(onWeightChanged(void)));
|
||||
connect(ui->cb_Visible, SIGNAL(currentIndexChanged(int)), this, SLOT(onVisibleChanged(void)));
|
||||
connect(ui->cb_Style, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskLineDecor::onStyleChanged);
|
||||
connect(ui->cc_Color, &ColorButton::changed, this, &TaskLineDecor::onColorChanged);
|
||||
connect(ui->dsb_Weight, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskLineDecor::onWeightChanged);
|
||||
connect(ui->cb_Visible, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskLineDecor::onVisibleChanged);
|
||||
|
||||
initUi();
|
||||
}
|
||||
@@ -260,10 +260,10 @@ TaskRestoreLines::TaskRestoreLines(TechDraw::DrawViewPart* partFeat,
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->pb_All, SIGNAL(clicked( )), this, SLOT(onAllPressed(void)));
|
||||
connect(ui->pb_Geometry, SIGNAL(clicked( )), this, SLOT(onGeometryPressed(void)));
|
||||
connect(ui->pb_Cosmetic, SIGNAL(clicked( )), this, SLOT(onCosmeticPressed( void )));
|
||||
connect(ui->pb_Center, SIGNAL(clicked( )), this, SLOT(onCenterPressed( void )));
|
||||
connect(ui->pb_All, &QPushButton::clicked, this, &TaskRestoreLines::onAllPressed);
|
||||
connect(ui->pb_Geometry, &QPushButton::clicked, this, &TaskRestoreLines::onGeometryPressed);
|
||||
connect(ui->pb_Cosmetic, &QPushButton::clicked, this, &TaskRestoreLines::onCosmeticPressed);
|
||||
connect(ui->pb_Center, &QPushButton::clicked, this, &TaskRestoreLines::onCenterPressed);
|
||||
|
||||
initUi();
|
||||
}
|
||||
|
||||
@@ -58,10 +58,10 @@ TaskLinkDim::TaskLinkDim(std::vector<App::DocumentObject*> parts, std::vector<st
|
||||
ui->selector->setAvailableLabel(tr("Available"));
|
||||
ui->selector->setSelectedLabel(tr("Selected"));
|
||||
|
||||
connect(ui->selector->availableTreeWidget(), SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
|
||||
this, SLOT(onCurrentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)));
|
||||
connect(ui->selector->selectedTreeWidget(), SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
|
||||
this, SLOT(onCurrentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)));
|
||||
connect(ui->selector->availableTreeWidget(), &QTreeWidget::currentItemChanged,
|
||||
this, &TaskLinkDim::onCurrentItemChanged);
|
||||
connect(ui->selector->selectedTreeWidget(), &QTreeWidget::currentItemChanged,
|
||||
this, &TaskLinkDim::onCurrentItemChanged);
|
||||
|
||||
loadAvailDims();
|
||||
|
||||
|
||||
@@ -87,28 +87,34 @@ TaskProjGroup::TaskProjGroup(TechDraw::DrawProjGroup* featView, bool mode) :
|
||||
|
||||
// Rotation buttons
|
||||
// Note we don't do the custom one here, as it's handled by [a different function that's held up in customs]
|
||||
connect(ui->butTopRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butCWRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butRightRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butDownRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butLeftRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butCCWRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butTopRotate, &QPushButton::clicked, this, &TaskProjGroup::rotateButtonClicked);
|
||||
connect(ui->butCWRotate, &QPushButton::clicked, this, &TaskProjGroup::rotateButtonClicked);
|
||||
connect(ui->butRightRotate, &QPushButton::clicked, this, &TaskProjGroup::rotateButtonClicked);
|
||||
connect(ui->butDownRotate, &QPushButton::clicked, this, &TaskProjGroup::rotateButtonClicked);
|
||||
connect(ui->butLeftRotate, &QPushButton::clicked, this, &TaskProjGroup::rotateButtonClicked);
|
||||
connect(ui->butCCWRotate, &QPushButton::clicked, this, &TaskProjGroup::rotateButtonClicked);
|
||||
|
||||
// //Reset button
|
||||
// connect(ui->butReset, SIGNAL(clicked()), this, SLOT(onResetClicked()));
|
||||
|
||||
// Slot for Scale Type
|
||||
connect(ui->cmbScaleType, SIGNAL(currentIndexChanged(int)), this, SLOT(scaleTypeChanged(int)));
|
||||
connect(ui->sbScaleNum, SIGNAL(valueChanged(int)), this, SLOT(scaleManuallyChanged(int)));
|
||||
connect(ui->sbScaleDen, SIGNAL(valueChanged(int)), this, SLOT(scaleManuallyChanged(int)));
|
||||
connect(ui->cmbScaleType, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskProjGroup::scaleTypeChanged);
|
||||
connect(ui->sbScaleNum, qOverload<int>(&QSpinBox::valueChanged), this, &TaskProjGroup::scaleManuallyChanged);
|
||||
connect(ui->sbScaleDen, qOverload<int>(&QSpinBox::valueChanged), this, &TaskProjGroup::scaleManuallyChanged);
|
||||
|
||||
// Slot for Projection Type (layout)
|
||||
connect(ui->projection, SIGNAL(currentIndexChanged(QString)), this, SLOT(projectionTypeChanged(QString)));
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
|
||||
connect(ui->projection, qOverload<const QString&>(&QComboBox::currentIndexChanged), this, &TaskProjGroup::projectionTypeChanged);
|
||||
#else
|
||||
connect(ui->projection, qOverload<int>(&QComboBox::currentIndexChanged), this, [=](int index) {
|
||||
projectionTypeChanged(ui->projection->itemText(index));
|
||||
});
|
||||
#endif
|
||||
|
||||
// Spacing
|
||||
connect(ui->cbAutoDistribute, SIGNAL(clicked(bool)), this, SLOT(AutoDistributeClicked(bool)));
|
||||
connect(ui->sbXSpacing, SIGNAL(valueChanged(double)), this, SLOT(spacingChanged()));
|
||||
connect(ui->sbYSpacing, SIGNAL(valueChanged(double)), this, SLOT(spacingChanged()));
|
||||
connect(ui->cbAutoDistribute, &QPushButton::clicked, this, &TaskProjGroup::AutoDistributeClicked);
|
||||
connect(ui->sbXSpacing, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskProjGroup::spacingChanged);
|
||||
connect(ui->sbYSpacing, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskProjGroup::spacingChanged);
|
||||
ui->sbXSpacing->setUnit(Base::Unit::Length);
|
||||
ui->sbYSpacing->setUnit(Base::Unit::Length);
|
||||
|
||||
@@ -457,7 +463,7 @@ void TaskProjGroup::setupViewCheckboxes(bool addConnections)
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
QCheckBox *box = viewCheckboxes[i];
|
||||
if (addConnections) {
|
||||
connect(box, SIGNAL(toggled(bool)), this, SLOT(viewToggled(bool)));
|
||||
connect(box, &QCheckBox::toggled, this, &TaskProjGroup::viewToggled);
|
||||
}
|
||||
|
||||
const char *viewStr = viewChkIndexToCStr(i);
|
||||
|
||||
@@ -106,8 +106,8 @@ TaskRichAnno::TaskRichAnno(TechDrawGui::ViewProviderRichAnno* annoVP) :
|
||||
-m_annoFeat->Y.getValue(),
|
||||
0.0));
|
||||
|
||||
connect(ui->pbEditor, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onEditorClicked(bool)));
|
||||
connect(ui->pbEditor, &QPushButton::clicked,
|
||||
this, &TaskRichAnno::onEditorClicked);
|
||||
}
|
||||
|
||||
//ctor for creation
|
||||
@@ -141,8 +141,8 @@ TaskRichAnno::TaskRichAnno(TechDraw::DrawView* baseFeat,
|
||||
|
||||
setUiPrimary();
|
||||
|
||||
connect(ui->pbEditor, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onEditorClicked(bool)));
|
||||
connect(ui->pbEditor, &QPushButton::clicked,
|
||||
this, &TaskRichAnno::onEditorClicked);
|
||||
}
|
||||
|
||||
void TaskRichAnno::updateTask()
|
||||
@@ -241,10 +241,10 @@ void TaskRichAnno::onEditorClicked(bool clicked)
|
||||
m_textDialog->setMinimumWidth (400);
|
||||
m_textDialog->setMinimumHeight(400);
|
||||
|
||||
connect(m_rte, SIGNAL(saveText(QString)),
|
||||
this, SLOT(onSaveAndExit(QString)));
|
||||
connect(m_rte, SIGNAL(editorFinished()),
|
||||
this, SLOT(onEditorExit()));
|
||||
connect(m_rte, &MRichTextEdit::saveText,
|
||||
this, &TaskRichAnno::onSaveAndExit);
|
||||
connect(m_rte, &MRichTextEdit::editorFinished,
|
||||
this, &TaskRichAnno::onEditorExit);
|
||||
|
||||
m_textDialog->show();
|
||||
}
|
||||
|
||||
@@ -195,40 +195,40 @@ void TaskSectionView::setUiCommon(Base::Vector3d origin)
|
||||
|
||||
enableAll(false);
|
||||
|
||||
connect(ui->leSymbol, SIGNAL(editingFinished()), this, SLOT(onIdentifierChanged()));
|
||||
connect(ui->leSymbol, &QLineEdit::editingFinished, this, &TaskSectionView::onIdentifierChanged);
|
||||
|
||||
//TODO: use event filter instead of keyboard tracking to capture enter/return keys
|
||||
// the UI file uses keyboardTracking = false so that a recomputation
|
||||
// will only be triggered when the arrow keys of the spinboxes are used
|
||||
//if this is not done, recomputes are triggered on each key press giving
|
||||
//unaccceptable UX
|
||||
connect(ui->sbScale, SIGNAL(valueChanged(double)), this, SLOT(onScaleChanged()));
|
||||
connect(ui->sbOrgX, SIGNAL(valueChanged(double)), this, SLOT(onXChanged()));
|
||||
connect(ui->sbOrgY, SIGNAL(valueChanged(double)), this, SLOT(onYChanged()));
|
||||
connect(ui->sbOrgZ, SIGNAL(valueChanged(double)), this, SLOT(onZChanged()));
|
||||
connect(ui->sbScale, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskSectionView::onScaleChanged);
|
||||
connect(ui->sbOrgX, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskSectionView::onXChanged);
|
||||
connect(ui->sbOrgY, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskSectionView::onYChanged);
|
||||
connect(ui->sbOrgZ, qOverload<double>(&QuantitySpinBox::valueChanged), this, &TaskSectionView::onZChanged);
|
||||
|
||||
connect(ui->cmbScaleType, SIGNAL(currentIndexChanged(int)), this, SLOT(scaleTypeChanged(int)));
|
||||
connect(ui->cmbScaleType, qOverload<int>(&QComboBox::currentIndexChanged), this, &TaskSectionView::scaleTypeChanged);
|
||||
|
||||
connect(ui->pbUp, SIGNAL(clicked(bool)), this, SLOT(onUpClicked()));
|
||||
connect(ui->pbDown, SIGNAL(clicked(bool)), this, SLOT(onDownClicked()));
|
||||
connect(ui->pbRight, SIGNAL(clicked(bool)), this, SLOT(onRightClicked()));
|
||||
connect(ui->pbLeft, SIGNAL(clicked(bool)), this, SLOT(onLeftClicked()));
|
||||
connect(ui->pbUp, &QToolButton::clicked, this, &TaskSectionView::onUpClicked);
|
||||
connect(ui->pbDown, &QToolButton::clicked, this, &TaskSectionView::onDownClicked);
|
||||
connect(ui->pbRight, &QToolButton::clicked, this, &TaskSectionView::onRightClicked);
|
||||
connect(ui->pbLeft, &QToolButton::clicked, this, &TaskSectionView::onLeftClicked);
|
||||
|
||||
connect(ui->pbUpdateNow, SIGNAL(clicked(bool)), this, SLOT(updateNowClicked()));
|
||||
connect(ui->cbLiveUpdate, SIGNAL(clicked(bool)), this, SLOT(liveUpdateClicked()));
|
||||
connect(ui->pbUpdateNow, &QToolButton::clicked, this, &TaskSectionView::updateNowClicked);
|
||||
connect(ui->cbLiveUpdate, &QToolButton::clicked, this, &TaskSectionView::liveUpdateClicked);
|
||||
|
||||
m_compass = new CompassWidget(this);
|
||||
auto layout = ui->compassLayout;
|
||||
layout->addWidget(m_compass);
|
||||
connect(m_compass, SIGNAL(angleChanged(double)), this, SLOT(slotChangeAngle(double)));
|
||||
connect(m_compass, &CompassWidget::angleChanged, this, &TaskSectionView::slotChangeAngle);
|
||||
|
||||
m_viewDirectionWidget = new VectorEditWidget(this);
|
||||
m_viewDirectionWidget->setLabel(QObject::tr("Current View Direction"));
|
||||
m_viewDirectionWidget->setToolTip(QObject::tr("The view direction in BaseView coordinates"));
|
||||
auto editLayout = ui->viewDirectionLayout;
|
||||
editLayout->addWidget(m_viewDirectionWidget);
|
||||
connect(m_viewDirectionWidget, SIGNAL(valueChanged(Base::Vector3d)), this,
|
||||
SLOT(slotViewDirectionChanged(Base::Vector3d)));
|
||||
connect(m_viewDirectionWidget, &VectorEditWidget::valueChanged, this,
|
||||
&TaskSectionView::slotViewDirectionChanged);
|
||||
}
|
||||
|
||||
//save the start conditions
|
||||
|
||||
@@ -261,14 +261,14 @@ void TaskSurfaceFinishSymbols::setUiEdit()
|
||||
pixmapItem->setZValue(-1);
|
||||
symbolScene->addItem(pixmapItem);
|
||||
|
||||
connect(ui->pbIcon01, SIGNAL(clicked()), this, SLOT(onIconChanged()));
|
||||
connect(ui->pbIcon02, SIGNAL(clicked()), this, SLOT(onIconChanged()));
|
||||
connect(ui->pbIcon03, SIGNAL(clicked()), this, SLOT(onIconChanged()));
|
||||
connect(ui->pbIcon04, SIGNAL(clicked()), this, SLOT(onIconChanged()));
|
||||
connect(ui->pbIcon05, SIGNAL(clicked()), this, SLOT(onIconChanged()));
|
||||
connect(ui->pbIcon06, SIGNAL(clicked()), this, SLOT(onIconChanged()));
|
||||
connect(ui->rbISO, SIGNAL(clicked()), this, SLOT(onISO()));
|
||||
connect(ui->rbASME, SIGNAL(clicked()), this, SLOT(onASME()));
|
||||
connect(ui->pbIcon01, &QPushButton::clicked, this, &TaskSurfaceFinishSymbols::onIconChanged);
|
||||
connect(ui->pbIcon02, &QPushButton::clicked, this, &TaskSurfaceFinishSymbols::onIconChanged);
|
||||
connect(ui->pbIcon03, &QPushButton::clicked, this, &TaskSurfaceFinishSymbols::onIconChanged);
|
||||
connect(ui->pbIcon04, &QPushButton::clicked, this, &TaskSurfaceFinishSymbols::onIconChanged);
|
||||
connect(ui->pbIcon05, &QPushButton::clicked, this, &TaskSurfaceFinishSymbols::onIconChanged);
|
||||
connect(ui->pbIcon06, &QPushButton::clicked, this, &TaskSurfaceFinishSymbols::onIconChanged);
|
||||
connect(ui->rbISO, &QPushButton::clicked, this, &TaskSurfaceFinishSymbols::onISO);
|
||||
connect(ui->rbASME, &QPushButton::clicked, this, &TaskSurfaceFinishSymbols::onASME);
|
||||
}
|
||||
|
||||
void TaskSurfaceFinishSymbols::onIconChanged()
|
||||
|
||||
@@ -66,16 +66,16 @@ TaskWeldingSymbol::TaskWeldingSymbol(TechDraw::DrawLeaderLine* leadFeat) :
|
||||
|
||||
setUiPrimary();
|
||||
|
||||
connect(ui->pbArrowSymbol, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onArrowSymbolCreateClicked()));
|
||||
connect(ui->pbOtherSymbol, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onOtherSymbolCreateClicked()));
|
||||
connect(ui->pbOtherErase, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onOtherEraseCreateClicked()));
|
||||
connect(ui->pbFlipSides, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onFlipSidesCreateClicked()));
|
||||
connect(ui->fcSymbolDir, SIGNAL(fileNameSelected(QString)),
|
||||
this, SLOT(onDirectorySelected(QString)));
|
||||
connect(ui->pbArrowSymbol, &QPushButton::clicked,
|
||||
this, &TaskWeldingSymbol::onArrowSymbolCreateClicked);
|
||||
connect(ui->pbOtherSymbol, &QPushButton::clicked,
|
||||
this, &TaskWeldingSymbol::onOtherSymbolCreateClicked);
|
||||
connect(ui->pbOtherErase, &QPushButton::clicked,
|
||||
this, &TaskWeldingSymbol::onOtherEraseCreateClicked);
|
||||
connect(ui->pbFlipSides, &QPushButton::clicked,
|
||||
this, &TaskWeldingSymbol::onFlipSidesCreateClicked);
|
||||
connect(ui->fcSymbolDir, &FileChooser::fileNameSelected,
|
||||
this, &TaskWeldingSymbol::onDirectorySelected);
|
||||
}
|
||||
|
||||
//ctor for edit
|
||||
@@ -106,40 +106,40 @@ TaskWeldingSymbol::TaskWeldingSymbol(TechDraw::DrawWeldSymbol* weld) :
|
||||
|
||||
setUiEdit();
|
||||
|
||||
connect(ui->pbArrowSymbol, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onArrowSymbolClicked()));
|
||||
connect(ui->pbOtherSymbol, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onOtherSymbolClicked()));
|
||||
connect(ui->pbOtherErase, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onOtherEraseClicked()));
|
||||
connect(ui->pbFlipSides, SIGNAL(clicked(bool)),
|
||||
this, SLOT(onFlipSidesClicked()));
|
||||
connect(ui->pbArrowSymbol, &QPushButton::clicked,
|
||||
this, &TaskWeldingSymbol::onArrowSymbolClicked);
|
||||
connect(ui->pbOtherSymbol, &QPushButton::clicked,
|
||||
this, &TaskWeldingSymbol::onOtherSymbolClicked);
|
||||
connect(ui->pbOtherErase, &QPushButton::clicked,
|
||||
this, &TaskWeldingSymbol::onOtherEraseClicked);
|
||||
connect(ui->pbFlipSides, &QPushButton::clicked,
|
||||
this, &TaskWeldingSymbol::onFlipSidesClicked);
|
||||
|
||||
connect(ui->fcSymbolDir, SIGNAL(fileNameSelected(const QString&)),
|
||||
this, SLOT(onDirectorySelected(const QString&)));
|
||||
connect(ui->fcSymbolDir, &FileChooser::fileNameSelected,
|
||||
this, &TaskWeldingSymbol::onDirectorySelected);
|
||||
|
||||
connect(ui->leArrowTextL, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(onArrowTextChanged()));
|
||||
connect(ui->leArrowTextR, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(onArrowTextChanged()));
|
||||
connect(ui->leArrowTextC, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(onArrowTextChanged()));
|
||||
connect(ui->leArrowTextL, &QLineEdit::textEdited,
|
||||
this, &TaskWeldingSymbol::onArrowTextChanged);
|
||||
connect(ui->leArrowTextR, &QLineEdit::textEdited,
|
||||
this, &TaskWeldingSymbol::onArrowTextChanged);
|
||||
connect(ui->leArrowTextC, &QLineEdit::textEdited,
|
||||
this, &TaskWeldingSymbol::onArrowTextChanged);
|
||||
|
||||
connect(ui->leOtherTextL, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(onOtherTextChanged()));
|
||||
connect(ui->leOtherTextR, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(onOtherTextChanged()));
|
||||
connect(ui->leOtherTextC, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(onOtherTextChanged()));
|
||||
connect(ui->leOtherTextL, &QLineEdit::textEdited,
|
||||
this, &TaskWeldingSymbol::onOtherTextChanged);
|
||||
connect(ui->leOtherTextR, &QLineEdit::textEdited,
|
||||
this, &TaskWeldingSymbol::onOtherTextChanged);
|
||||
connect(ui->leOtherTextC, &QLineEdit::textEdited,
|
||||
this, &TaskWeldingSymbol::onOtherTextChanged);
|
||||
|
||||
connect(ui->leTailText, SIGNAL(textEdited(QString)),
|
||||
this, SLOT(onWeldingChanged()));
|
||||
connect(ui->cbFieldWeld, SIGNAL(toggled(bool)),
|
||||
this, SLOT(onWeldingChanged()));
|
||||
connect(ui->cbAllAround, SIGNAL(toggled(bool)),
|
||||
this, SLOT(onWeldingChanged()));
|
||||
connect(ui->cbAltWeld, SIGNAL(toggled(bool)),
|
||||
this, SLOT(onWeldingChanged()));
|
||||
connect(ui->leTailText, &QLineEdit::textEdited,
|
||||
this, &TaskWeldingSymbol::onWeldingChanged);
|
||||
connect(ui->cbFieldWeld, &QCheckBox::toggled,
|
||||
this, &TaskWeldingSymbol::onWeldingChanged);
|
||||
connect(ui->cbAllAround, &QCheckBox::toggled,
|
||||
this, &TaskWeldingSymbol::onWeldingChanged);
|
||||
connect(ui->cbAltWeld, &QCheckBox::toggled,
|
||||
this, &TaskWeldingSymbol::onWeldingChanged);
|
||||
}
|
||||
|
||||
TaskWeldingSymbol::~TaskWeldingSymbol()
|
||||
@@ -244,8 +244,8 @@ void TaskWeldingSymbol::symbolDialog(const char* source)
|
||||
{
|
||||
QString _source = tr(source);
|
||||
SymbolChooser* dlg = new SymbolChooser(this, m_currDir, _source);
|
||||
connect(dlg, SIGNAL(symbolSelected(QString, QString)),
|
||||
this, SLOT(onSymbolSelected(QString, QString)));
|
||||
connect(dlg, &SymbolChooser::symbolSelected,
|
||||
this, &TaskWeldingSymbol::onSymbolSelected);
|
||||
dlg->setAttribute(Qt::WA_DeleteOnClose);
|
||||
dlg->exec();
|
||||
}
|
||||
|
||||
@@ -65,10 +65,10 @@ VectorEditWidget::VectorEditWidget(QWidget* parent) : QWidget(parent),
|
||||
setObjectName(QString::fromUtf8("VectorEdit"));
|
||||
buildWidget();
|
||||
|
||||
connect(tbExpand, SIGNAL(toggled(bool)), this, SLOT(slotExpandButtonToggled(bool)));
|
||||
connect(dsbX, SIGNAL(valueChanged(double)), this, SLOT(slotXValueChanged(double)));
|
||||
connect(dsbY, SIGNAL(valueChanged(double)), this, SLOT(slotYValueChanged(double)));
|
||||
connect(dsbZ, SIGNAL(valueChanged(double)), this, SLOT(slotZValueChanged(double)));
|
||||
connect(tbExpand, &QToolButton::toggled, this, &VectorEditWidget::slotExpandButtonToggled);
|
||||
connect(dsbX, qOverload<double>(&Gui::DoubleSpinBox::valueChanged), this, &VectorEditWidget::slotXValueChanged);
|
||||
connect(dsbY, qOverload<double>(&Gui::DoubleSpinBox::valueChanged), this, &VectorEditWidget::slotYValueChanged);
|
||||
connect(dsbZ, qOverload<double>(&Gui::DoubleSpinBox::valueChanged), this, &VectorEditWidget::slotZValueChanged);
|
||||
|
||||
dsbX->installEventFilter(this);
|
||||
dsbY->installEventFilter(this);
|
||||
|
||||
@@ -74,17 +74,17 @@ MRichTextEdit::MRichTextEdit(QWidget *parent, QString textIn) : QWidget(parent)
|
||||
m_defFont = getDefFont().family();
|
||||
f_textedit->setFont(getDefFont());
|
||||
|
||||
connect(f_save, SIGNAL(clicked()),
|
||||
this, SLOT(onSave()));
|
||||
connect(f_exit, SIGNAL(clicked()),
|
||||
this, SLOT(onExit()));
|
||||
connect(f_save, &QToolButton::clicked,
|
||||
this, &MRichTextEdit::onSave);
|
||||
connect(f_exit, &QToolButton::clicked,
|
||||
this, &MRichTextEdit::onExit);
|
||||
|
||||
connect(f_textedit, SIGNAL(currentCharFormatChanged(QTextCharFormat)),
|
||||
this, SLOT(slotCurrentCharFormatChanged(QTextCharFormat)));
|
||||
connect(f_textedit, SIGNAL(cursorPositionChanged()),
|
||||
this, SLOT(slotCursorPositionChanged()));
|
||||
connect(f_textedit, SIGNAL(selectionChanged()),
|
||||
this, SLOT(onSelectionChanged()));
|
||||
connect(f_textedit, &MTextEdit::currentCharFormatChanged,
|
||||
this, &MRichTextEdit::slotCurrentCharFormatChanged);
|
||||
connect(f_textedit, &MTextEdit::cursorPositionChanged,
|
||||
this, &MRichTextEdit::slotCursorPositionChanged);
|
||||
connect(f_textedit, &MTextEdit::selectionChanged,
|
||||
this, &MRichTextEdit::onSelectionChanged);
|
||||
|
||||
|
||||
m_fontsize_h1 = m_defFontSize + 8;
|
||||
@@ -106,24 +106,24 @@ MRichTextEdit::MRichTextEdit(QWidget *parent, QString textIn) : QWidget(parent)
|
||||
<< QString::fromUtf8(" ");
|
||||
f_paragraph->addItems(m_paragraphItems);
|
||||
|
||||
connect(f_paragraph, SIGNAL(activated(int)),
|
||||
this, SLOT(textStyle(int)));
|
||||
connect(f_paragraph, qOverload<int>(&QComboBox::activated),
|
||||
this, &MRichTextEdit::textStyle);
|
||||
|
||||
// undo & redo
|
||||
|
||||
f_undo->setShortcut(QKeySequence::Undo);
|
||||
f_redo->setShortcut(QKeySequence::Redo);
|
||||
|
||||
connect(f_textedit->document(), SIGNAL(undoAvailable(bool)),
|
||||
f_undo, SLOT(setEnabled(bool)));
|
||||
connect(f_textedit->document(), SIGNAL(redoAvailable(bool)),
|
||||
f_redo, SLOT(setEnabled(bool)));
|
||||
connect(f_textedit->document(), &QTextDocument::undoAvailable,
|
||||
f_undo, &QToolButton::setEnabled);
|
||||
connect(f_textedit->document(), &QTextDocument::redoAvailable,
|
||||
f_redo, &QToolButton::setEnabled);
|
||||
|
||||
f_undo->setEnabled(f_textedit->document()->isUndoAvailable());
|
||||
f_redo->setEnabled(f_textedit->document()->isRedoAvailable());
|
||||
|
||||
connect(f_undo, SIGNAL(clicked()), f_textedit, SLOT(undo()));
|
||||
connect(f_redo, SIGNAL(clicked()), f_textedit, SLOT(redo()));
|
||||
connect(f_undo, &QToolButton::clicked, f_textedit, &MTextEdit::undo);
|
||||
connect(f_redo, &QToolButton::clicked, f_textedit, &MTextEdit::redo);
|
||||
|
||||
// cut, copy & paste
|
||||
|
||||
@@ -134,22 +134,22 @@ MRichTextEdit::MRichTextEdit(QWidget *parent, QString textIn) : QWidget(parent)
|
||||
f_cut->setEnabled(false);
|
||||
f_copy->setEnabled(false);
|
||||
|
||||
connect(f_cut, SIGNAL(clicked()), f_textedit, SLOT(cut()));
|
||||
connect(f_copy, SIGNAL(clicked()), f_textedit, SLOT(copy()));
|
||||
connect(f_paste, SIGNAL(clicked()), f_textedit, SLOT(paste()));
|
||||
connect(f_cut, &QToolButton::clicked, f_textedit, &MTextEdit::cut);
|
||||
connect(f_copy, &QToolButton::clicked, f_textedit, &MTextEdit::copy);
|
||||
connect(f_paste, &QToolButton::clicked, f_textedit, &MTextEdit::paste);
|
||||
|
||||
connect(f_textedit, SIGNAL(copyAvailable(bool)), f_cut, SLOT(setEnabled(bool)));
|
||||
connect(f_textedit, SIGNAL(copyAvailable(bool)), f_copy, SLOT(setEnabled(bool)));
|
||||
connect(f_textedit, &MTextEdit::copyAvailable, f_cut, &QToolButton::setEnabled);
|
||||
connect(f_textedit, &MTextEdit::copyAvailable, f_copy, &QToolButton::setEnabled);
|
||||
|
||||
#ifndef QT_NO_CLIPBOARD
|
||||
connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(slotClipboardDataChanged()));
|
||||
connect(QApplication::clipboard(), &QClipboard::dataChanged, this, &MRichTextEdit::slotClipboardDataChanged);
|
||||
#endif
|
||||
|
||||
// link
|
||||
|
||||
f_link->setShortcut(QKeySequence(QString::fromUtf8("CTRL+L")));
|
||||
|
||||
connect(f_link, SIGNAL(clicked(bool)), this, SLOT(textLink(bool)));
|
||||
connect(f_link, &QToolButton::clicked, this, &MRichTextEdit::textLink);
|
||||
|
||||
// bold, italic & underline
|
||||
|
||||
@@ -157,23 +157,23 @@ MRichTextEdit::MRichTextEdit(QWidget *parent, QString textIn) : QWidget(parent)
|
||||
f_italic->setShortcut(QKeySequence(QString::fromUtf8("CTRL+I")));
|
||||
f_underline->setShortcut(QKeySequence(QString::fromUtf8("CTRL+U")));
|
||||
|
||||
connect(f_bold, SIGNAL(clicked()), this, SLOT(textBold()));
|
||||
connect(f_italic, SIGNAL(clicked()), this, SLOT(textItalic()));
|
||||
connect(f_underline, SIGNAL(clicked()), this, SLOT(textUnderline()));
|
||||
connect(f_strikeout, SIGNAL(clicked()), this, SLOT(textStrikeout()));
|
||||
connect(f_bold, &QToolButton::clicked, this, &MRichTextEdit::textBold);
|
||||
connect(f_italic, &QToolButton::clicked, this, &MRichTextEdit::textItalic);
|
||||
connect(f_underline, &QToolButton::clicked, this, &MRichTextEdit::textUnderline);
|
||||
connect(f_strikeout, &QToolButton::clicked, this, &MRichTextEdit::textStrikeout);
|
||||
|
||||
QAction *removeFormat = new QAction(tr("Remove character formatting"), this);
|
||||
removeFormat->setShortcut(QKeySequence(QString::fromUtf8("CTRL+M")));
|
||||
connect(removeFormat, SIGNAL(triggered()), this, SLOT(textRemoveFormat()));
|
||||
connect(removeFormat, &QAction::triggered, this, &MRichTextEdit::textRemoveFormat);
|
||||
f_textedit->addAction(removeFormat);
|
||||
|
||||
QAction *removeAllFormat = new QAction(tr("Remove all formatting"), this);
|
||||
connect(removeAllFormat, SIGNAL(triggered()), this, SLOT(textRemoveAllFormat()));
|
||||
connect(removeAllFormat, &QAction::triggered, this, &MRichTextEdit::textRemoveAllFormat);
|
||||
f_textedit->addAction(removeAllFormat);
|
||||
|
||||
QAction *textsource = new QAction(tr("Edit document source"), this);
|
||||
textsource->setShortcut(QKeySequence(QString::fromUtf8("CTRL+O")));
|
||||
connect(textsource, SIGNAL(triggered()), this, SLOT(textSource()));
|
||||
connect(textsource, &QAction::triggered, this, &MRichTextEdit::textSource);
|
||||
f_textedit->addAction(textsource);
|
||||
|
||||
QMenu *menu = new QMenu(this);
|
||||
@@ -188,16 +188,16 @@ MRichTextEdit::MRichTextEdit(QWidget *parent, QString textIn) : QWidget(parent)
|
||||
f_list_bullet->setShortcut(QKeySequence(QString::fromUtf8("CTRL+-")));
|
||||
f_list_ordered->setShortcut(QKeySequence(QString::fromUtf8("CTRL+=")));
|
||||
|
||||
connect(f_list_bullet, SIGNAL(clicked(bool)), this, SLOT(listBullet(bool)));
|
||||
connect(f_list_ordered, SIGNAL(clicked(bool)), this, SLOT(listOrdered(bool)));
|
||||
connect(f_list_bullet, &QToolButton::clicked, this, &MRichTextEdit::listBullet);
|
||||
connect(f_list_ordered, &QToolButton::clicked, this, &MRichTextEdit::listOrdered);
|
||||
|
||||
// indentation
|
||||
|
||||
f_indent_dec->setShortcut(QKeySequence(QString::fromUtf8("CTRL+, ")));
|
||||
f_indent_inc->setShortcut(QKeySequence(QString::fromUtf8("CTRL+.")));
|
||||
|
||||
connect(f_indent_inc, SIGNAL(clicked()), this, SLOT(increaseIndentation()));
|
||||
connect(f_indent_dec, SIGNAL(clicked()), this, SLOT(decreaseIndentation()));
|
||||
connect(f_indent_inc, &QToolButton::clicked, this, &MRichTextEdit::increaseIndentation);
|
||||
connect(f_indent_dec, &QToolButton::clicked, this, &MRichTextEdit::decreaseIndentation);
|
||||
|
||||
// font size
|
||||
|
||||
@@ -207,19 +207,25 @@ MRichTextEdit::MRichTextEdit(QWidget *parent, QString textIn) : QWidget(parent)
|
||||
f_fontsize->addItem(QString::number(size));
|
||||
}
|
||||
//TODO: void QComboBox::setEditText(const QString &text) to " " when multiple select
|
||||
connect(f_fontsize, SIGNAL(currentIndexChanged(QString)),
|
||||
this, SLOT(textSize(QString)));
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
|
||||
connect(f_fontsize, qOverload<const QString&>(&QComboBox::currentIndexChanged),
|
||||
this, &MRichTextEdit::textSize);
|
||||
#else
|
||||
connect(f_fontsize, qOverload<int>(&QComboBox::currentIndexChanged), this, [=](int index) {
|
||||
textSize(f_fontsize->itemText(index));
|
||||
});
|
||||
#endif
|
||||
|
||||
// text foreground color
|
||||
|
||||
connect(f_fgcolor, SIGNAL(clicked()), this, SLOT(textFgColor()));
|
||||
connect(f_fgcolor, &QToolButton::clicked, this, &MRichTextEdit::textFgColor);
|
||||
|
||||
// text background color
|
||||
|
||||
connect(f_bgcolor, SIGNAL(clicked()), this, SLOT(textBgColor()));
|
||||
connect(f_bgcolor, &QToolButton::clicked, this, &MRichTextEdit::textBgColor);
|
||||
|
||||
// images
|
||||
connect(f_image, SIGNAL(clicked()), this, SLOT(insertImage()));
|
||||
connect(f_image, &QToolButton::clicked, this, &MRichTextEdit::insertImage);
|
||||
|
||||
//set initial font size when editing existing text
|
||||
if (!textIn.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user