task widget based from qwidget instead of qdialog
This commit is contained in:
@@ -44,6 +44,8 @@
|
||||
#include <Base/Sequencer.h>
|
||||
#include <Gui/Control.h>
|
||||
|
||||
#include "ui_BSurf.h"
|
||||
|
||||
|
||||
using namespace SurfaceGui;
|
||||
//#undef CS_FUTURE // multi-threading causes some problems
|
||||
@@ -141,7 +143,7 @@ void BSurf::changeEvent(QEvent *e)
|
||||
ui->retranslateUi(this);
|
||||
}
|
||||
else {
|
||||
QDialog::changeEvent(e);
|
||||
QWidget::changeEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +153,6 @@ void BSurf::accept()
|
||||
apply();
|
||||
Gui::Command::commitCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
void BSurf::reject()
|
||||
@@ -164,7 +165,6 @@ void BSurf::reject()
|
||||
Gui::Command::commitCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
void BSurf::apply()
|
||||
@@ -214,13 +214,13 @@ void TaskBSurf::setEditedObject(Surface::BSurf* obj)
|
||||
bool TaskBSurf::accept()
|
||||
{
|
||||
widget->accept();
|
||||
return (widget->result() == QDialog::Accepted);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TaskBSurf::reject()
|
||||
{
|
||||
widget->reject();
|
||||
return (widget->result() == QDialog::Rejected);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Apply clicked
|
||||
|
||||
@@ -30,15 +30,16 @@
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
#include <Base/BoundBox.h>
|
||||
#include <QDialog>
|
||||
#include <QWidget>
|
||||
#include <QPointer>
|
||||
#include "../FillType.h"
|
||||
#include <Mod/Part/Gui/ViewProvider.h>
|
||||
#include "ui_BSurf.h"
|
||||
#include "../App/FeatureBSurf.h"
|
||||
|
||||
namespace SurfaceGui
|
||||
{
|
||||
|
||||
class Ui_DlgBSurf;
|
||||
|
||||
class SurfaceGuiExport ViewProviderBSurf : public PartGui::ViewProviderPart
|
||||
{
|
||||
@@ -48,7 +49,7 @@ namespace SurfaceGui
|
||||
virtual void unsetEdit(int ModNum);
|
||||
};
|
||||
|
||||
class BSurf : public QDialog
|
||||
class BSurf : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SurfaceGui::DlgBSurf</class>
|
||||
<widget class="QDialog" name="SurfaceGui::DlgBSurf">
|
||||
<widget class="QWidget" name="SurfaceGui::DlgBSurf">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
||||
Reference in New Issue
Block a user