Make tool's dialog modal.
--HG-- branch : develop
This commit is contained in:
parent
8ab19ced93
commit
f82364e53b
|
@ -2,6 +2,9 @@
|
|||
<ui version="4.0">
|
||||
<class>DialogAboutApp</class>
|
||||
<widget class="QDialog" name="DialogAboutApp">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<ui version="4.0">
|
||||
<class>DialogIndividualMeasurements</class>
|
||||
<widget class="QDialog" name="DialogIndividualMeasurements">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -17,6 +20,9 @@
|
|||
<iconset resource="../../share/resources/icon.qrc">
|
||||
<normaloff>:/icon/64x64/icon64x64.png</normaloff>:/icon/64x64/icon64x64.png</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<ui version="4.0">
|
||||
<class>DialogMeasurements</class>
|
||||
<widget class="QDialog" name="DialogMeasurements">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -29,6 +32,9 @@
|
|||
<iconset resource="../../share/resources/icon.qrc">
|
||||
<normaloff>:/icon/64x64/icon64x64.png</normaloff>:/icon/64x64/icon64x64.png</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<ui version="4.0">
|
||||
<class>DialogStandardMeasurements</class>
|
||||
<widget class="QDialog" name="DialogStandardMeasurements">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -17,6 +20,9 @@
|
|||
<iconset resource="../../share/resources/icon.qrc">
|
||||
<normaloff>:/icon/64x64/icon64x64.png</normaloff>:/icon/64x64/icon64x64.png</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
|
|
|
@ -108,6 +108,7 @@ void DialogAlongLine::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
number = 0;
|
||||
if (isInitialized == false)
|
||||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -184,6 +184,7 @@ void DialogArc::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
|
||||
ChangeCurrentText(ui->comboBoxBasePoint, point->name());
|
||||
emit ToolTip("");
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,6 +130,7 @@ void DialogBisector::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
}
|
||||
if (isInitialized == false)
|
||||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ void DialogCutArc::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
const VArc *arc = data->GeometricObject<const VArc *>(id);
|
||||
ChangeCurrentText(ui->comboBoxArc, arc->name());
|
||||
emit ToolTip("");
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ void DialogCutSpline::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
const VSpline *spl = data->GeometricObject<const VSpline *>(id);
|
||||
ChangeCurrentText(ui->comboBoxSpline, spl->name());
|
||||
emit ToolTip("");
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ void DialogCutSplinePath::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
const VSplinePath *splPath = data->GeometricObject<const VSplinePath *>(id);
|
||||
ChangeCurrentText(ui->comboBoxSplinePath, splPath->name());
|
||||
emit ToolTip("");
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<ui version="4.0">
|
||||
<class>DialogEditWrongFormula</class>
|
||||
<widget class="QDialog" name="DialogEditWrongFormula">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -17,6 +20,9 @@
|
|||
<iconset resource="../../share/resources/icon.qrc">
|
||||
<normaloff>:/icon/64x64/icon64x64.png</normaloff>:/icon/64x64/icon64x64.png</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
|
|
|
@ -91,6 +91,7 @@ void DialogEndLine::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
const VPointF *point = data->GeometricObject<const VPointF *>(id);
|
||||
ChangeCurrentText(ui->comboBoxBasePoint, point->name());
|
||||
emit ToolTip("");
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,6 +148,7 @@ void DialogHeight::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
emit ToolTip(tr(""));
|
||||
if (isInitialized == false)
|
||||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -106,6 +106,7 @@ void DialogLine::setFirstPoint(const quint32 &value)
|
|||
*/
|
||||
void DialogLine::DialogAccepted()
|
||||
{
|
||||
//TODO check if points different
|
||||
qint32 index = ui->comboBoxFirstPoint->currentIndex();
|
||||
firstPoint = qvariant_cast<quint32>(ui->comboBoxFirstPoint->itemData(index));
|
||||
index = ui->comboBoxSecondPoint->currentIndex();
|
||||
|
@ -147,6 +148,7 @@ void DialogLine::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
}
|
||||
if (isInitialized == false)
|
||||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<ui version="4.0">
|
||||
<class>DialogLine</class>
|
||||
<widget class="QDialog" name="DialogLine">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -20,7 +23,10 @@
|
|||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>9</x>
|
||||
|
|
|
@ -123,6 +123,7 @@ void DialogLineIntersect::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
{
|
||||
flagPoint = CheckIntersecion();
|
||||
CheckState();
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
connect(ui->comboBoxP1Line1,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
|
|
|
@ -107,6 +107,7 @@ void DialogNormal::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
number = 0;
|
||||
if (isInitialized == false)
|
||||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -137,6 +137,7 @@ void DialogPointOfContact::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
}
|
||||
if (isInitialized == false)
|
||||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,6 +106,7 @@ void DialogPointOfIntersection::ChoosedObject(quint32 id, const SceneObject &typ
|
|||
}
|
||||
if (isInitialized == false)
|
||||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,6 +128,7 @@ void DialogShoulderPoint::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
}
|
||||
if (isInitialized == false)
|
||||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<class>DialogSinglePoint</class>
|
||||
<widget class="QDialog" name="DialogSinglePoint">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::WindowModal</enum>
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
|
|
|
@ -106,6 +106,7 @@ void DialogSpline::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
}
|
||||
if (isInitialized == false)
|
||||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,8 +72,6 @@ DialogTool::DialogTool(const VContainer *data, QWidget *parent)
|
|||
//Keep synchronize with VAbstractTool styles list!!!
|
||||
lineStyles<<tr("No line")<<tr("Line")<<tr("Dash Line")<<tr("Dot Line")<<tr("Dash Dot Line")
|
||||
<<tr("Dash Dot Dot Line");
|
||||
Qt::WindowFlags flags = windowFlags();
|
||||
setWindowFlags(flags | Qt::WindowStaysOnTopHint);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -96,6 +96,7 @@ void DialogTriangle::ChoosedObject(quint32 id, const SceneObject &type)
|
|||
emit ToolTip(tr(""));
|
||||
if (isInitialized == false)
|
||||
{
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -145,6 +145,7 @@ void DialogUnionDetails::ChoosedDetail(const quint32 &id, const SceneObject &typ
|
|||
{
|
||||
++numberP;
|
||||
emit ToolTip("");
|
||||
this->setModal(true);
|
||||
this->show();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<ui version="4.0">
|
||||
<class>DialogUnionDetails</class>
|
||||
<widget class="QDialog" name="DialogUnionDetails">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::NonModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -29,6 +32,9 @@
|
|||
<iconset resource="../../share/resources/icon.qrc">
|
||||
<normaloff>:/icon/64x64/icon64x64.png</normaloff>:/icon/64x64/icon64x64.png</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
|
|
|
@ -121,6 +121,7 @@ protected:
|
|||
QGraphicsScene *scene = tool->scene();
|
||||
QList<QGraphicsView *> list = scene->views();
|
||||
dialog = new Dialog(getData(), list.first());
|
||||
dialog->setModal(true);
|
||||
|
||||
connect(qobject_cast< VMainGraphicsScene * >(tool->scene()),
|
||||
&VMainGraphicsScene::ChoosedObject, dialog, &DialogTool::ChoosedObject);
|
||||
|
|
|
@ -71,6 +71,7 @@ VToolEndLine::VToolEndLine(VPattern *doc, VContainer *data, const quint32 &id,
|
|||
void VToolEndLine::setDialog()
|
||||
{
|
||||
SCASSERT(dialog != nullptr);
|
||||
dialog->setModal(true);
|
||||
DialogEndLine *dialogTool = qobject_cast<DialogEndLine*>(dialog);
|
||||
SCASSERT(dialogTool != nullptr);
|
||||
const VPointF *p = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
|
|
|
@ -408,6 +408,7 @@ void VToolDetail::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
|||
QGraphicsScene *scene = this->scene();
|
||||
QList<QGraphicsView *> list = scene->views();
|
||||
dialog = new DialogDetail(getData(), list.first());
|
||||
dialog->setModal(true);
|
||||
connect(qobject_cast< VMainGraphicsScene * >(this->scene()), &VMainGraphicsScene::ChoosedObject,
|
||||
dialog, &DialogTool::ChoosedObject);
|
||||
connect(dialog, &DialogTool::DialogClosed, this, &VToolDetail::FullUpdateFromGuiOk);
|
||||
|
|
Loading…
Reference in New Issue
Block a user