fix Coverity issues
This commit is contained in:
parent
8cc3ee64e8
commit
0824c5fd3c
|
@ -99,7 +99,7 @@ private:
|
||||||
Gui::PropertyView * prop;
|
Gui::PropertyView * prop;
|
||||||
QTreeView * tree;
|
QTreeView * tree;
|
||||||
Gui::TaskView::TaskView * taskPanel;
|
Gui::TaskView::TaskView * taskPanel;
|
||||||
Gui::ProjectWidget * projectView;
|
//Gui::ProjectWidget * projectView;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace DockWnd
|
} // namespace DockWnd
|
||||||
|
|
|
@ -217,7 +217,14 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
StdCmdFreezeViews::StdCmdFreezeViews()
|
StdCmdFreezeViews::StdCmdFreezeViews()
|
||||||
: Command("Std_FreezeViews"), maxViews(50), savedViews(0)
|
: Command("Std_FreezeViews")
|
||||||
|
, maxViews(50)
|
||||||
|
, savedViews(0)
|
||||||
|
, offset(0)
|
||||||
|
, saveView(0)
|
||||||
|
, freezeView(0)
|
||||||
|
, clearView(0)
|
||||||
|
, separator(0)
|
||||||
{
|
{
|
||||||
sGroup = QT_TR_NOOP("Standard-View");
|
sGroup = QT_TR_NOOP("Standard-View");
|
||||||
sMenuText = QT_TR_NOOP("Freeze display");
|
sMenuText = QT_TR_NOOP("Freeze display");
|
||||||
|
@ -812,7 +819,7 @@ void StdCmdToggleSelectability::activated(int iMsg)
|
||||||
|
|
||||||
for (std::vector<App::DocumentObject*>::const_iterator ft=sel.begin();ft!=sel.end();++ft) {
|
for (std::vector<App::DocumentObject*>::const_iterator ft=sel.begin();ft!=sel.end();++ft) {
|
||||||
ViewProvider *pr = pcDoc->getViewProviderByName((*ft)->getNameInDocument());
|
ViewProvider *pr = pcDoc->getViewProviderByName((*ft)->getNameInDocument());
|
||||||
if (pr->isDerivedFrom(ViewProviderGeometryObject::getClassTypeId())){
|
if (pr && pr->isDerivedFrom(ViewProviderGeometryObject::getClassTypeId())){
|
||||||
if (static_cast<ViewProviderGeometryObject*>(pr)->Selectable.getValue())
|
if (static_cast<ViewProviderGeometryObject*>(pr)->Selectable.getValue())
|
||||||
doCommand(Gui,"Gui.getDocument(\"%s\").getObject(\"%s\").Selectable=False"
|
doCommand(Gui,"Gui.getDocument(\"%s\").getObject(\"%s\").Selectable=False"
|
||||||
, (*it)->getName(), (*ft)->getNameInDocument());
|
, (*it)->getName(), (*ft)->getNameInDocument());
|
||||||
|
|
|
@ -38,7 +38,9 @@ VertexProperty::VertexProperty() :
|
||||||
text(new QGraphicsTextItem()),
|
text(new QGraphicsTextItem()),
|
||||||
row(0),
|
row(0),
|
||||||
column(0),
|
column(0),
|
||||||
|
topoSortIndex(0),
|
||||||
lastVisibleState(VisibilityState::None),
|
lastVisibleState(VisibilityState::None),
|
||||||
|
lastFeatureState(FeatureState::None),
|
||||||
dagVisible(true)
|
dagVisible(true)
|
||||||
{
|
{
|
||||||
//set z values.
|
//set z values.
|
||||||
|
|
|
@ -59,7 +59,8 @@ std::list<DlgPreferencesImp::TGroupPages> DlgPreferencesImp::_pages;
|
||||||
* true to construct a modal dialog.
|
* true to construct a modal dialog.
|
||||||
*/
|
*/
|
||||||
DlgPreferencesImp::DlgPreferencesImp(QWidget* parent, Qt::WindowFlags fl)
|
DlgPreferencesImp::DlgPreferencesImp(QWidget* parent, Qt::WindowFlags fl)
|
||||||
: QDialog(parent, fl), ui(new Ui_DlgPreferences), canEmbedScrollArea(true)
|
: QDialog(parent, fl), ui(new Ui_DlgPreferences),
|
||||||
|
invalidParameter(false), canEmbedScrollArea(true)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ using namespace Gui::Dialog;
|
||||||
|
|
||||||
|
|
||||||
DownloadDialog::DownloadDialog(const QUrl& url, QWidget *parent)
|
DownloadDialog::DownloadDialog(const QUrl& url, QWidget *parent)
|
||||||
: QDialog(parent), url(url)
|
: QDialog(parent), url(url), file(0), httpGetId(0), httpRequestAborted(false)
|
||||||
{
|
{
|
||||||
statusLabel = new QLabel(url.toString());
|
statusLabel = new QLabel(url.toString());
|
||||||
progressBar = new QProgressBar(this);
|
progressBar = new QProgressBar(this);
|
||||||
|
|
|
@ -28,14 +28,16 @@ using namespace Gui;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ExpressionCompleter::ExpressionCompleter(const App::Document * currentDoc, const App::DocumentObject * currentDocObj, QObject *parent)
|
ExpressionCompleter::ExpressionCompleter(const App::Document * currentDoc, const App::DocumentObject * currentDocObj, QObject *parent)
|
||||||
: QCompleter(parent)
|
: QCompleter(parent), prefixStart(0)
|
||||||
{
|
{
|
||||||
QStandardItemModel* model = new QStandardItemModel(this);
|
QStandardItemModel* model = new QStandardItemModel(this);
|
||||||
|
|
||||||
std::vector<App::Document*> docs = App::GetApplication().getDocuments();
|
std::vector<App::Document*> docs = App::GetApplication().getDocuments();
|
||||||
std::vector<App::Document*>::const_iterator di = docs.begin();
|
std::vector<App::Document*>::const_iterator di = docs.begin();
|
||||||
|
|
||||||
std::vector<DocumentObject*> deps = currentDocObj->getInList();
|
std::vector<DocumentObject*> deps;
|
||||||
|
if (currentDocObj)
|
||||||
|
deps = currentDocObj->getInList();
|
||||||
std::set<const DocumentObject*> forbidden;
|
std::set<const DocumentObject*> forbidden;
|
||||||
|
|
||||||
for (std::vector<DocumentObject*>::const_iterator it = deps.begin(); it != deps.end(); ++it)
|
for (std::vector<DocumentObject*>::const_iterator it = deps.begin(); it != deps.end(); ++it)
|
||||||
|
|
|
@ -35,7 +35,7 @@ using namespace Gui;
|
||||||
|
|
||||||
TYPESYSTEM_SOURCE_ABSTRACT(Gui::GLGraphicsItem, Base::BaseClass);
|
TYPESYSTEM_SOURCE_ABSTRACT(Gui::GLGraphicsItem, Base::BaseClass);
|
||||||
|
|
||||||
GLPainter::GLPainter() : viewer(0), logicOp(false), lineStipple(false)
|
GLPainter::GLPainter() : viewer(0), width(0), height(0), logicOp(false), lineStipple(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,13 +208,23 @@ Rubberband::Rubberband(View3DInventorViewer* v) : viewer(v)
|
||||||
x_old = y_old = x_new = y_new = 0;
|
x_old = y_old = x_new = y_new = 0;
|
||||||
working = false;
|
working = false;
|
||||||
stipple = true;
|
stipple = true;
|
||||||
|
|
||||||
|
rgb_r = 1.0f;
|
||||||
|
rgb_g = 1.0f;
|
||||||
|
rgb_b = 1.0f;
|
||||||
|
rgb_a = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rubberband::Rubberband()
|
Rubberband::Rubberband() : viewer(0)
|
||||||
{
|
{
|
||||||
x_old = y_old = x_new = y_new = 0;
|
x_old = y_old = x_new = y_new = 0;
|
||||||
working = false;
|
working = false;
|
||||||
stipple = true;
|
stipple = true;
|
||||||
|
|
||||||
|
rgb_r = 1.0f;
|
||||||
|
rgb_g = 1.0f;
|
||||||
|
rgb_b = 1.0f;
|
||||||
|
rgb_a = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rubberband::~Rubberband()
|
Rubberband::~Rubberband()
|
||||||
|
@ -309,7 +319,7 @@ Polyline::Polyline(View3DInventorViewer* v) : viewer(v)
|
||||||
rgb_a = 1.0f;
|
rgb_a = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Polyline::Polyline()
|
Polyline::Polyline() : viewer(0)
|
||||||
{
|
{
|
||||||
x_new = y_new = 0;
|
x_new = y_new = 0;
|
||||||
working = false;
|
working = false;
|
||||||
|
|
|
@ -52,6 +52,7 @@ MacroManager::MacroManager()
|
||||||
recordGui(true),
|
recordGui(true),
|
||||||
guiAsComment(true),
|
guiAsComment(true),
|
||||||
scriptToPyConsole(true),
|
scriptToPyConsole(true),
|
||||||
|
localEnv(true),
|
||||||
pyConsole(0),
|
pyConsole(0),
|
||||||
pyDebugger(new PythonDebugger())
|
pyDebugger(new PythonDebugger())
|
||||||
{
|
{
|
||||||
|
@ -203,7 +204,7 @@ namespace Gui {
|
||||||
class PythonRedirector
|
class PythonRedirector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PythonRedirector(const char* type, PyObject* obj) : std_out(type), out(obj)
|
PythonRedirector(const char* type, PyObject* obj) : std_out(type), out(obj), old(0)
|
||||||
{
|
{
|
||||||
if (out) {
|
if (out) {
|
||||||
Base::PyGILStateLocker lock;
|
Base::PyGILStateLocker lock;
|
||||||
|
|
|
@ -97,7 +97,7 @@ private:
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
MergeDocuments::MergeDocuments(App::Document* doc) : appdoc(doc)
|
MergeDocuments::MergeDocuments(App::Document* doc) : stream(0), appdoc(doc)
|
||||||
{
|
{
|
||||||
connectExport = doc->signalExportObjects.connect
|
connectExport = doc->signalExportObjects.connect
|
||||||
(boost::bind(&MergeDocuments::exportObject, this, _1, _2));
|
(boost::bind(&MergeDocuments::exportObject, this, _1, _2));
|
||||||
|
|
|
@ -47,6 +47,10 @@ using namespace Gui;
|
||||||
|
|
||||||
AbstractMouseSelection::AbstractMouseSelection() : _pcView3D(0)
|
AbstractMouseSelection::AbstractMouseSelection() : _pcView3D(0)
|
||||||
{
|
{
|
||||||
|
m_iXold = 0;
|
||||||
|
m_iYold = 0;
|
||||||
|
m_iXnew = 0;
|
||||||
|
m_iYnew = 0;
|
||||||
m_bInner = true;
|
m_bInner = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,6 +249,7 @@ static const char* cursor_cut_scissors[]= {
|
||||||
|
|
||||||
PolyPickerSelection::PolyPickerSelection()
|
PolyPickerSelection::PolyPickerSelection()
|
||||||
{
|
{
|
||||||
|
lastConfirmed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PolyPickerSelection::setColor(float r, float g, float b, float a)
|
void PolyPickerSelection::setColor(float r, float g, float b, float a)
|
||||||
|
|
|
@ -63,10 +63,12 @@ struct NavigationStyleP {
|
||||||
NavigationStyleP()
|
NavigationStyleP()
|
||||||
{
|
{
|
||||||
this->animationsteps = 0;
|
this->animationsteps = 0;
|
||||||
|
this->animationdelta = 0;
|
||||||
this->sensitivity = 2.0f;
|
this->sensitivity = 2.0f;
|
||||||
this->resetcursorpos = false;
|
this->resetcursorpos = false;
|
||||||
this->dragPointFound = false;
|
this->dragPointFound = false;
|
||||||
this->dragAtCursor = false;
|
this->dragAtCursor = false;
|
||||||
|
this->animsensor = 0;
|
||||||
}
|
}
|
||||||
static void viewAnimationCB(void * data, SoSensor * sensor);
|
static void viewAnimationCB(void * data, SoSensor * sensor);
|
||||||
};
|
};
|
||||||
|
|
|
@ -100,7 +100,13 @@ struct PythonConsoleP
|
||||||
PythonConsoleP()
|
PythonConsoleP()
|
||||||
{
|
{
|
||||||
type = Normal;
|
type = Normal;
|
||||||
|
_stdoutPy = 0;
|
||||||
|
_stderrPy = 0;
|
||||||
|
_stdinPy = 0;
|
||||||
|
_stdin = 0;
|
||||||
interpreter = 0;
|
interpreter = 0;
|
||||||
|
callTipsList = 0;
|
||||||
|
interactive = false;
|
||||||
colormap[QLatin1String("Text")] = Qt::black;
|
colormap[QLatin1String("Text")] = Qt::black;
|
||||||
colormap[QLatin1String("Bookmark")] = Qt::cyan;
|
colormap[QLatin1String("Bookmark")] = Qt::cyan;
|
||||||
colormap[QLatin1String("Breakpoint")] = Qt::red;
|
colormap[QLatin1String("Breakpoint")] = Qt::red;
|
||||||
|
@ -367,7 +373,6 @@ PythonConsole::PythonConsole(QWidget *parent)
|
||||||
: TextEdit(parent), WindowParameter( "Editor" ), _sourceDrain(NULL)
|
: TextEdit(parent), WindowParameter( "Editor" ), _sourceDrain(NULL)
|
||||||
{
|
{
|
||||||
d = new PythonConsoleP();
|
d = new PythonConsoleP();
|
||||||
d->interactive = false;
|
|
||||||
|
|
||||||
// create an instance of InteractiveInterpreter
|
// create an instance of InteractiveInterpreter
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -352,6 +352,9 @@ struct PythonDebuggerP {
|
||||||
PythonDebuggerP(PythonDebugger* that) :
|
PythonDebuggerP(PythonDebugger* that) :
|
||||||
init(false), trystop(false), running(false)
|
init(false), trystop(false), running(false)
|
||||||
{
|
{
|
||||||
|
out_o = 0;
|
||||||
|
err_o = 0;
|
||||||
|
exc_o = 0;
|
||||||
Base::PyGILStateLocker lock;
|
Base::PyGILStateLocker lock;
|
||||||
out_n = new PythonDebugStdout();
|
out_n = new PythonDebugStdout();
|
||||||
err_n = new PythonDebugStderr();
|
err_n = new PythonDebugStderr();
|
||||||
|
|
|
@ -976,12 +976,17 @@ void SelectionSingleton::slotDeletedObject(const App::DocumentObject& Obj)
|
||||||
*/
|
*/
|
||||||
SelectionSingleton::SelectionSingleton()
|
SelectionSingleton::SelectionSingleton()
|
||||||
{
|
{
|
||||||
|
hx = 0;
|
||||||
|
hy = 0;
|
||||||
|
hz = 0;
|
||||||
ActiveGate = 0;
|
ActiveGate = 0;
|
||||||
App::GetApplication().signalDeletedObject.connect(boost::bind(&Gui::SelectionSingleton::slotDeletedObject, this, _1));
|
App::GetApplication().signalDeletedObject.connect(boost::bind(&Gui::SelectionSingleton::slotDeletedObject, this, _1));
|
||||||
CurrentPreselection.pDocName = 0;
|
CurrentPreselection.pDocName = 0;
|
||||||
CurrentPreselection.pObjectName = 0;
|
CurrentPreselection.pObjectName = 0;
|
||||||
CurrentPreselection.pSubName = 0;
|
CurrentPreselection.pSubName = 0;
|
||||||
|
CurrentPreselection.x = 0.0;
|
||||||
|
CurrentPreselection.y = 0.0;
|
||||||
|
CurrentPreselection.z = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -362,10 +362,10 @@ bool SelectionFilter::parse(void)
|
||||||
TopBlock = 0;
|
TopBlock = 0;
|
||||||
SelectionParser::SelectionFilter_delete_buffer (my_string_buffer);
|
SelectionParser::SelectionFilter_delete_buffer (my_string_buffer);
|
||||||
|
|
||||||
if(Errors == "")
|
if (Errors.empty()) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
delete Ast;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,19 +199,19 @@ SoGroup* TDragger::buildGeometry()
|
||||||
|
|
||||||
void TDragger::startCB(void *, SoDragger *d)
|
void TDragger::startCB(void *, SoDragger *d)
|
||||||
{
|
{
|
||||||
TDragger *sudoThis = dynamic_cast<TDragger *>(d);
|
TDragger *sudoThis = static_cast<TDragger *>(d);
|
||||||
sudoThis->dragStart();
|
sudoThis->dragStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TDragger::motionCB(void *, SoDragger *d)
|
void TDragger::motionCB(void *, SoDragger *d)
|
||||||
{
|
{
|
||||||
TDragger *sudoThis = dynamic_cast<TDragger *>(d);
|
TDragger *sudoThis = static_cast<TDragger *>(d);
|
||||||
sudoThis->drag();
|
sudoThis->drag();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TDragger::finishCB(void *, SoDragger *d)
|
void TDragger::finishCB(void *, SoDragger *d)
|
||||||
{
|
{
|
||||||
TDragger *sudoThis = dynamic_cast<TDragger *>(d);
|
TDragger *sudoThis = static_cast<TDragger *>(d);
|
||||||
sudoThis->dragFinish();
|
sudoThis->dragFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,19 +471,19 @@ SoGroup* RDragger::buildGeometry()
|
||||||
|
|
||||||
void RDragger::startCB(void *, SoDragger *d)
|
void RDragger::startCB(void *, SoDragger *d)
|
||||||
{
|
{
|
||||||
RDragger *sudoThis = dynamic_cast<RDragger *>(d);
|
RDragger *sudoThis = static_cast<RDragger *>(d);
|
||||||
sudoThis->dragStart();
|
sudoThis->dragStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RDragger::motionCB(void *, SoDragger *d)
|
void RDragger::motionCB(void *, SoDragger *d)
|
||||||
{
|
{
|
||||||
RDragger *sudoThis = dynamic_cast<RDragger *>(d);
|
RDragger *sudoThis = static_cast<RDragger *>(d);
|
||||||
sudoThis->drag();
|
sudoThis->drag();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RDragger::finishCB(void *, SoDragger *d)
|
void RDragger::finishCB(void *, SoDragger *d)
|
||||||
{
|
{
|
||||||
RDragger *sudoThis = dynamic_cast<RDragger *>(d);
|
RDragger *sudoThis = static_cast<RDragger *>(d);
|
||||||
sudoThis->dragFinish();
|
sudoThis->dragFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,11 @@ SoFCColorBar::SoFCColorBar()
|
||||||
{
|
{
|
||||||
SO_NODE_CONSTRUCTOR(SoFCColorBar);
|
SO_NODE_CONSTRUCTOR(SoFCColorBar);
|
||||||
|
|
||||||
|
_fMaxX = 0;
|
||||||
|
_fMinX = 0;
|
||||||
|
_fMaxY = 0;
|
||||||
|
_fMinY = 0;
|
||||||
|
|
||||||
// SoEventCallback * cb = new SoEventCallback;
|
// SoEventCallback * cb = new SoEventCallback;
|
||||||
// cb->addEventCallback(SoMouseButtonEvent::getClassTypeId(), eventCallback, this);
|
// cb->addEventCallback(SoMouseButtonEvent::getClassTypeId(), eventCallback, this);
|
||||||
// insertChild(cb, 0);
|
// insertChild(cb, 0);
|
||||||
|
|
|
@ -406,6 +406,7 @@ void SoQtOffscreenRenderer::init(const SbViewportRegion & vpr,
|
||||||
this->pixelbuffer = NULL; // constructed later
|
this->pixelbuffer = NULL; // constructed later
|
||||||
this->framebuffer = NULL;
|
this->framebuffer = NULL;
|
||||||
this->numSamples = -1;
|
this->numSamples = -1;
|
||||||
|
this->cache_context = 0;
|
||||||
this->pbuffer = QGLPixelBuffer::hasOpenGLPbuffers();
|
this->pbuffer = QGLPixelBuffer::hasOpenGLPbuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -825,7 +825,21 @@ namespace Gui {
|
||||||
class SoBoxSelectionRenderActionP {
|
class SoBoxSelectionRenderActionP {
|
||||||
public:
|
public:
|
||||||
SoBoxSelectionRenderActionP(SoBoxSelectionRenderAction * master)
|
SoBoxSelectionRenderActionP(SoBoxSelectionRenderAction * master)
|
||||||
: master(master) { }
|
: master(master)
|
||||||
|
, searchaction(0)
|
||||||
|
, selectsearch(0)
|
||||||
|
, camerasearch(0)
|
||||||
|
, bboxaction(0)
|
||||||
|
, basecolor(0)
|
||||||
|
, postprocpath(0)
|
||||||
|
, highlightPath(0)
|
||||||
|
, localRoot(0)
|
||||||
|
, xform(0)
|
||||||
|
, cube(0)
|
||||||
|
, drawstyle(0)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
SoBoxSelectionRenderAction * master;
|
SoBoxSelectionRenderAction * master;
|
||||||
SoSearchAction * searchaction;
|
SoSearchAction * searchaction;
|
||||||
|
|
|
@ -57,7 +57,9 @@ class SoVectorizePoint : public SoVectorizeItem {
|
||||||
public:
|
public:
|
||||||
SoVectorizePoint(void) {
|
SoVectorizePoint(void) {
|
||||||
this->type = POINT;
|
this->type = POINT;
|
||||||
|
this->vidx = 0;
|
||||||
this->size = 1.0f;
|
this->size = 1.0f;
|
||||||
|
this->col = 0;
|
||||||
}
|
}
|
||||||
int vidx; // index to BSPtree coordinate
|
int vidx; // index to BSPtree coordinate
|
||||||
float size; // Coin size (pixels)
|
float size; // Coin size (pixels)
|
||||||
|
@ -90,6 +92,9 @@ class SoVectorizeText : public SoVectorizeItem {
|
||||||
public:
|
public:
|
||||||
SoVectorizeText(void) {
|
SoVectorizeText(void) {
|
||||||
this->type = TEXT;
|
this->type = TEXT;
|
||||||
|
this->fontsize = 10;
|
||||||
|
this->col = 0;
|
||||||
|
this->justification = LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Justification {
|
enum Justification {
|
||||||
|
|
|
@ -58,7 +58,9 @@ class SoVectorizePoint : public SoVectorizeItem {
|
||||||
public:
|
public:
|
||||||
SoVectorizePoint(void) {
|
SoVectorizePoint(void) {
|
||||||
this->type = POINT;
|
this->type = POINT;
|
||||||
|
this->vidx = 0;
|
||||||
this->size = 1.0f;
|
this->size = 1.0f;
|
||||||
|
this->col = 0;
|
||||||
}
|
}
|
||||||
int vidx; // index to BSPtree coordinate
|
int vidx; // index to BSPtree coordinate
|
||||||
float size; // Coin size (pixels)
|
float size; // Coin size (pixels)
|
||||||
|
@ -91,6 +93,9 @@ class SoVectorizeText : public SoVectorizeItem {
|
||||||
public:
|
public:
|
||||||
SoVectorizeText(void) {
|
SoVectorizeText(void) {
|
||||||
this->type = TEXT;
|
this->type = TEXT;
|
||||||
|
this->fontsize = 10;
|
||||||
|
this->col = 0;
|
||||||
|
this->justification = LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Justification {
|
enum Justification {
|
||||||
|
|
|
@ -121,13 +121,13 @@ SoGestureSwipeEvent::SoGestureSwipeEvent(QSwipeGesture *qwsipe, QWidget *widget)
|
||||||
}
|
}
|
||||||
switch (qwsipe->horizontalDirection()){
|
switch (qwsipe->horizontalDirection()){
|
||||||
case QSwipeGesture::Right :
|
case QSwipeGesture::Right :
|
||||||
vertDir = +1;
|
horzDir = +1;
|
||||||
break;
|
break;
|
||||||
case QSwipeGesture::Left :
|
case QSwipeGesture::Left :
|
||||||
vertDir = -1;
|
horzDir = -1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
vertDir = 0;
|
horzDir = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,9 +39,9 @@ class SoGestureEvent : public SoEvent {
|
||||||
public:
|
public:
|
||||||
static void initClass(){
|
static void initClass(){
|
||||||
SO_EVENT_INIT_CLASS(SoGestureEvent, SoEvent);
|
SO_EVENT_INIT_CLASS(SoGestureEvent, SoEvent);
|
||||||
};
|
}
|
||||||
SoGestureEvent(){};
|
SoGestureEvent() : state(SbGSNoGesture) {}
|
||||||
~SoGestureEvent(){};
|
~SoGestureEvent(){}
|
||||||
SbBool isSoGestureEvent(const SoEvent* ev) const;
|
SbBool isSoGestureEvent(const SoEvent* ev) const;
|
||||||
|
|
||||||
enum SbGestureState {
|
enum SbGestureState {
|
||||||
|
@ -59,10 +59,10 @@ class SoGesturePanEvent : public SoGestureEvent {
|
||||||
public:
|
public:
|
||||||
static void initClass(){//needs to be called before the class can be used. Initializes type IDs of the class.
|
static void initClass(){//needs to be called before the class can be used. Initializes type IDs of the class.
|
||||||
SO_EVENT_INIT_CLASS(SoGesturePanEvent, SoGestureEvent);
|
SO_EVENT_INIT_CLASS(SoGesturePanEvent, SoGestureEvent);
|
||||||
};
|
}
|
||||||
SoGesturePanEvent() {};
|
SoGesturePanEvent() {}
|
||||||
SoGesturePanEvent(QPanGesture *qpan, QWidget *widget);
|
SoGesturePanEvent(QPanGesture *qpan, QWidget *widget);
|
||||||
~SoGesturePanEvent(){};
|
~SoGesturePanEvent(){}
|
||||||
SbBool isSoGesturePanEvent(const SoEvent* ev) const;
|
SbBool isSoGesturePanEvent(const SoEvent* ev) const;
|
||||||
|
|
||||||
SbVec2f deltaOffset;
|
SbVec2f deltaOffset;
|
||||||
|
@ -74,10 +74,13 @@ class SoGesturePinchEvent : public SoGestureEvent {
|
||||||
public:
|
public:
|
||||||
static void initClass(){
|
static void initClass(){
|
||||||
SO_EVENT_INIT_CLASS(SoGesturePinchEvent, SoGestureEvent);
|
SO_EVENT_INIT_CLASS(SoGesturePinchEvent, SoGestureEvent);
|
||||||
};
|
}
|
||||||
SoGesturePinchEvent(){};
|
SoGesturePinchEvent() : deltaZoom(0), totalZoom(0),
|
||||||
|
deltaAngle(0), totalAngle(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
SoGesturePinchEvent(QPinchGesture* qpinch, QWidget* widget);
|
SoGesturePinchEvent(QPinchGesture* qpinch, QWidget* widget);
|
||||||
~SoGesturePinchEvent(){};
|
~SoGesturePinchEvent(){}
|
||||||
SbBool isSoGesturePinchEvent(const SoEvent* ev) const;
|
SbBool isSoGesturePinchEvent(const SoEvent* ev) const;
|
||||||
|
|
||||||
SbVec2f startCenter;//in GL pixel coordinates (from bottom left corner of view area)
|
SbVec2f startCenter;//in GL pixel coordinates (from bottom left corner of view area)
|
||||||
|
@ -95,10 +98,12 @@ class SoGestureSwipeEvent : public SoGestureEvent {
|
||||||
public:
|
public:
|
||||||
static void initClass(){
|
static void initClass(){
|
||||||
SO_EVENT_INIT_CLASS(SoGestureSwipeEvent, SoGestureEvent);
|
SO_EVENT_INIT_CLASS(SoGestureSwipeEvent, SoGestureEvent);
|
||||||
};
|
}
|
||||||
SoGestureSwipeEvent(){};
|
SoGestureSwipeEvent() : angle(0), vertDir(0), horzDir(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
SoGestureSwipeEvent(QSwipeGesture* qwsipe, QWidget *widget);
|
SoGestureSwipeEvent(QSwipeGesture* qwsipe, QWidget *widget);
|
||||||
~SoGestureSwipeEvent(){};
|
~SoGestureSwipeEvent(){}
|
||||||
SbBool isSoGestureSwipeEvent(const SoEvent* ev) const;
|
SbBool isSoGestureSwipeEvent(const SoEvent* ev) const;
|
||||||
|
|
||||||
double angle;
|
double angle;
|
||||||
|
|
|
@ -35,7 +35,7 @@ EventBase::EventBase(QEvent::Type event) : QInputEvent(static_cast<QEvent::Type>
|
||||||
}
|
}
|
||||||
|
|
||||||
MotionEvent::MotionEvent() : EventBase(static_cast<QEvent::Type>(MotionEventType)),
|
MotionEvent::MotionEvent() : EventBase(static_cast<QEvent::Type>(MotionEventType)),
|
||||||
xTrans(0), yTrans(0), zTrans(0), xRot(0), yRot(0), zRot(0)
|
xTrans(0), yTrans(0), zTrans(0), xRot(0), yRot(0), zRot(0), handled(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ TaskSelectLinkProperty::TaskSelectLinkProperty(const char *sFilter,App::Property
|
||||||
|
|
||||||
// property have to be set!
|
// property have to be set!
|
||||||
assert(prop);
|
assert(prop);
|
||||||
|
StartObject = 0;
|
||||||
if (prop->getTypeId().isDerivedFrom(App::PropertyLinkSub::getClassTypeId())) {
|
if (prop->getTypeId().isDerivedFrom(App::PropertyLinkSub::getClassTypeId())) {
|
||||||
LinkSub = dynamic_cast<App::PropertyLinkSub *>(prop);
|
LinkSub = dynamic_cast<App::PropertyLinkSub *>(prop);
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@ TaskWatcherCommands::TaskWatcherCommands(const char* Filter,const char* commands
|
||||||
const char* name, const char* pixmap)
|
const char* name, const char* pixmap)
|
||||||
: TaskWatcher(Filter)
|
: TaskWatcher(Filter)
|
||||||
{
|
{
|
||||||
|
if (commands) {
|
||||||
CommandManager &mgr = Gui::Application::Instance->commandManager();
|
CommandManager &mgr = Gui::Application::Instance->commandManager();
|
||||||
Gui::TaskView::TaskBox *tb = new Gui::TaskView::TaskBox
|
Gui::TaskView::TaskBox *tb = new Gui::TaskView::TaskBox
|
||||||
(BitmapFactory().pixmap(pixmap), trUtf8(name), true, 0);
|
(BitmapFactory().pixmap(pixmap), trUtf8(name), true, 0);
|
||||||
|
@ -101,6 +102,7 @@ TaskWatcherCommands::TaskWatcherCommands(const char* Filter,const char* commands
|
||||||
|
|
||||||
Content.push_back(tb);
|
Content.push_back(tb);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//==== implementer ===========================================================================
|
//==== implementer ===========================================================================
|
||||||
|
|
|
@ -39,7 +39,7 @@ using namespace Gui;
|
||||||
* Constructs a TextEdit which is a child of 'parent'.
|
* Constructs a TextEdit which is a child of 'parent'.
|
||||||
*/
|
*/
|
||||||
TextEdit::TextEdit(QWidget* parent)
|
TextEdit::TextEdit(QWidget* parent)
|
||||||
: QPlainTextEdit(parent), listBox(0)
|
: QPlainTextEdit(parent), cursorPosition(0), listBox(0)
|
||||||
{
|
{
|
||||||
//Note: Set the correct context to this shortcut as we may use several instances of this
|
//Note: Set the correct context to this shortcut as we may use several instances of this
|
||||||
//class at a time
|
//class at a time
|
||||||
|
|
|
@ -62,7 +62,7 @@ const int TreeWidget::ObjectType = 1001;
|
||||||
|
|
||||||
/* TRANSLATOR Gui::TreeWidget */
|
/* TRANSLATOR Gui::TreeWidget */
|
||||||
TreeWidget::TreeWidget(QWidget* parent)
|
TreeWidget::TreeWidget(QWidget* parent)
|
||||||
: QTreeWidget(parent), fromOutside(false)
|
: QTreeWidget(parent), contextItem(0), fromOutside(false)
|
||||||
{
|
{
|
||||||
this->setDragEnabled(true);
|
this->setDragEnabled(true);
|
||||||
this->setAcceptDrops(true);
|
this->setAcceptDrops(true);
|
||||||
|
|
|
@ -248,11 +248,8 @@ Py::Object View3DInventorViewerPy::seekToPoint(const Py::Tuple& args)
|
||||||
catch (const Py::Exception&) {
|
catch (const Py::Exception&) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Py::None();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Py::Object View3DInventorViewerPy::setFocalDistance(const Py::Tuple& args)
|
Py::Object View3DInventorViewerPy::setFocalDistance(const Py::Tuple& args)
|
||||||
{
|
{
|
||||||
float distance;
|
float distance;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user