fix -Wextra in FreeCADGui
This commit is contained in:
parent
1ab7e05fce
commit
f19d424d8b
|
@ -78,7 +78,9 @@ public:
|
|||
* and get called by the observed class
|
||||
* @param rCaller a reference to the calling object
|
||||
*/
|
||||
virtual void OnDestroy(Subject<_MessageType> & rCaller){}
|
||||
virtual void OnDestroy(Subject<_MessageType> & rCaller) {
|
||||
(void)rCaller;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method can be reimplemented from the concrete Observer
|
||||
|
|
|
@ -323,7 +323,7 @@ struct PyMethodDef FreeCADGui_methods[] = {
|
|||
"getSoDBVersion() -> String\n\n"
|
||||
"Return a text string containing the name\n"
|
||||
"of the Coin library and version information"},
|
||||
{NULL, NULL} /* sentinel */
|
||||
{NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
|
@ -1397,7 +1397,7 @@ void messageHandler(QtMsgType type, const char *msg)
|
|||
}
|
||||
|
||||
#ifdef FC_DEBUG // redirect Coin messages to FreeCAD
|
||||
void messageHandlerCoin(const SoError * error, void * userdata)
|
||||
void messageHandlerCoin(const SoError * error, void * /*userdata*/)
|
||||
{
|
||||
if (error && error->getTypeId() == SoDebugError::getClassTypeId()) {
|
||||
const SoDebugError* dbg = static_cast<const SoDebugError*>(error);
|
||||
|
|
|
@ -174,7 +174,7 @@ PyMethodDef Application::Methods[] = {
|
|||
"createViewer([int]) -> View3DInventor/SplitView3DInventor\n\n"
|
||||
"shows and returns a viewer. If the integer argument is given and > 1: -> splitViewer"},
|
||||
|
||||
{NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, 0, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
PyObject* Gui::Application::sActiveDocument(PyObject * /*self*/, PyObject *args, PyObject * /*kwd*/)
|
||||
|
@ -803,8 +803,11 @@ PyObject* Application::sGetWorkbenchHandler(PyObject * /*self*/, PyObject *args,
|
|||
return pcWorkbench;
|
||||
}
|
||||
|
||||
PyObject* Application::sListWorkbenchHandlers(PyObject * /*self*/, PyObject *args,PyObject * /*kwd*/)
|
||||
PyObject* Application::sListWorkbenchHandlers(PyObject * /*self*/, PyObject *args, PyObject * /*kwd*/)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C
|
||||
return NULL; // NULL triggers exception
|
||||
|
||||
Py_INCREF(Instance->_pcWorkbenchDictionary);
|
||||
return Instance->_pcWorkbenchDictionary;
|
||||
}
|
||||
|
|
|
@ -959,12 +959,12 @@ SOURCE_GROUP("Widget" FILES ${Widget_SRCS})
|
|||
SET(View_CPP_SRCS
|
||||
MDIView.cpp
|
||||
GraphvizView.cpp
|
||||
ActiveObjectList.cpp
|
||||
ActiveObjectList.cpp
|
||||
)
|
||||
SET(View_HPP_SRCS
|
||||
MDIView.h
|
||||
GraphvizView.h
|
||||
ActiveObjectList.h
|
||||
ActiveObjectList.h
|
||||
)
|
||||
SET(View_SRCS
|
||||
${View_CPP_SRCS}
|
||||
|
|
|
@ -86,6 +86,7 @@ public:
|
|||
}
|
||||
static void moveCallback(void * data, SoSensor * sensor)
|
||||
{
|
||||
Q_UNUSED(sensor);
|
||||
Private* self = reinterpret_cast<Private*>(data);
|
||||
if (self->view) {
|
||||
Gui::View3DInventorViewer* view = self->view->getViewer();
|
||||
|
|
|
@ -739,8 +739,9 @@ MacroCommand::~MacroCommand()
|
|||
|
||||
void MacroCommand::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
QDir d;
|
||||
|
||||
if(!systemMacro) {
|
||||
std::string cMacroPath;
|
||||
|
||||
|
|
|
@ -93,6 +93,8 @@ StdCmdOpen::StdCmdOpen()
|
|||
|
||||
void StdCmdOpen::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
// fill the list of registered endings
|
||||
QString formatList;
|
||||
const char* supported = QT_TR_NOOP("Supported formats");
|
||||
|
@ -173,6 +175,8 @@ StdCmdImport::StdCmdImport()
|
|||
|
||||
void StdCmdImport::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
// fill the list of registered endings
|
||||
QString formatList;
|
||||
const char* supported = QT_TR_NOOP("Supported formats");
|
||||
|
@ -258,6 +262,8 @@ StdCmdExport::StdCmdExport()
|
|||
|
||||
void StdCmdExport::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
if (Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) == 0) {
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
QString::fromUtf8(QT_TR_NOOP("No selection")),
|
||||
|
@ -319,6 +325,8 @@ StdCmdMergeProjects::StdCmdMergeProjects()
|
|||
|
||||
void StdCmdMergeProjects::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
QString exe = qApp->applicationName();
|
||||
QString project = QFileDialog::getOpenFileName(Gui::getMainWindow(),
|
||||
QString::fromUtf8(QT_TR_NOOP("Merge project")), FileDialog::getWorkingDirectory(),
|
||||
|
@ -370,6 +378,7 @@ StdCmdExportGraphviz::StdCmdExportGraphviz()
|
|||
|
||||
void StdCmdExportGraphviz::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
App::Document* doc = App::GetApplication().getActiveDocument();
|
||||
Gui::GraphvizView* view = new Gui::GraphvizView(*doc);
|
||||
view->setWindowTitle(qApp->translate("Std_ExportGraphviz","Dependency graph"));
|
||||
|
@ -401,6 +410,7 @@ StdCmdNew::StdCmdNew()
|
|||
|
||||
void StdCmdNew::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QString cmd;
|
||||
cmd = QString::fromLatin1("App.newDocument(\"%1\")")
|
||||
.arg(qApp->translate("StdCmdNew","Unnamed"));
|
||||
|
@ -427,6 +437,7 @@ StdCmdSave::StdCmdSave()
|
|||
|
||||
void StdCmdSave::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
#if 0
|
||||
Gui::Document* pActiveDoc = getActiveGuiDocument();
|
||||
if ( pActiveDoc )
|
||||
|
@ -468,6 +479,7 @@ StdCmdSaveAs::StdCmdSaveAs()
|
|||
|
||||
void StdCmdSaveAs::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
#if 0
|
||||
Gui::Document* pActiveDoc = getActiveGuiDocument();
|
||||
if ( pActiveDoc )
|
||||
|
@ -505,6 +517,7 @@ StdCmdSaveCopy::StdCmdSaveCopy()
|
|||
|
||||
void StdCmdSaveCopy::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
#if 0
|
||||
Gui::Document* pActiveDoc = getActiveGuiDocument();
|
||||
if ( pActiveDoc )
|
||||
|
@ -537,6 +550,7 @@ StdCmdRevert::StdCmdRevert()
|
|||
|
||||
void StdCmdRevert::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QMessageBox msgBox(Gui::getMainWindow());
|
||||
msgBox.setIcon(QMessageBox::Question);
|
||||
msgBox.setWindowTitle(qApp->translate("Std_Revert","Revert document"));
|
||||
|
@ -576,8 +590,9 @@ StdCmdProjectInfo::StdCmdProjectInfo()
|
|||
|
||||
void StdCmdProjectInfo::activated(int iMsg)
|
||||
{
|
||||
Gui::Dialog::DlgProjectInformationImp dlg(getActiveGuiDocument()->getDocument(), getMainWindow());
|
||||
dlg.exec();
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Dialog::DlgProjectInformationImp dlg(getActiveGuiDocument()->getDocument(), getMainWindow());
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
bool StdCmdProjectInfo::isActive(void)
|
||||
|
@ -604,6 +619,7 @@ StdCmdProjectUtil::StdCmdProjectUtil()
|
|||
|
||||
void StdCmdProjectUtil::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Dialog::DlgProjectUtility dlg(getMainWindow());
|
||||
dlg.exec();
|
||||
}
|
||||
|
@ -632,6 +648,7 @@ StdCmdPrint::StdCmdPrint()
|
|||
|
||||
void StdCmdPrint::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
if (getMainWindow()->activeWindow()) {
|
||||
getMainWindow()->showMessage(QObject::tr("Printing..."));
|
||||
getMainWindow()->activeWindow()->print();
|
||||
|
@ -661,6 +678,7 @@ StdCmdPrintPreview::StdCmdPrintPreview()
|
|||
|
||||
void StdCmdPrintPreview::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
if (getMainWindow()->activeWindow()) {
|
||||
getMainWindow()->activeWindow()->printPreview();
|
||||
}
|
||||
|
@ -688,6 +706,7 @@ StdCmdPrintPdf::StdCmdPrintPdf()
|
|||
|
||||
void StdCmdPrintPdf::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
if (getMainWindow()->activeWindow()) {
|
||||
getMainWindow()->showMessage(QObject::tr("Exporting PDF..."));
|
||||
getMainWindow()->activeWindow()->printPdf();
|
||||
|
@ -721,6 +740,7 @@ StdCmdQuit::StdCmdQuit()
|
|||
|
||||
void StdCmdQuit::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// close the main window and exit the event loop
|
||||
getMainWindow()->close();
|
||||
}
|
||||
|
@ -746,8 +766,9 @@ StdCmdUndo::StdCmdUndo()
|
|||
|
||||
void StdCmdUndo::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// Application::Instance->slotUndo();
|
||||
getGuiApplication()->sendMsgToActiveView("Undo");
|
||||
getGuiApplication()->sendMsgToActiveView("Undo");
|
||||
}
|
||||
|
||||
bool StdCmdUndo::isActive(void)
|
||||
|
@ -789,8 +810,9 @@ StdCmdRedo::StdCmdRedo()
|
|||
|
||||
void StdCmdRedo::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// Application::Instance->slotRedo();
|
||||
getGuiApplication()->sendMsgToActiveView("Redo");
|
||||
getGuiApplication()->sendMsgToActiveView("Redo");
|
||||
}
|
||||
|
||||
bool StdCmdRedo::isActive(void)
|
||||
|
@ -830,6 +852,7 @@ StdCmdCut::StdCmdCut()
|
|||
|
||||
void StdCmdCut::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
getGuiApplication()->sendMsgToActiveView("Cut");
|
||||
}
|
||||
|
||||
|
@ -857,6 +880,7 @@ StdCmdCopy::StdCmdCopy()
|
|||
|
||||
void StdCmdCopy::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
bool done = getGuiApplication()->sendMsgToActiveView("Copy");
|
||||
if (!done) {
|
||||
QMimeData * mimeData = getMainWindow()->createMimeDataFromSelection();
|
||||
|
@ -891,6 +915,7 @@ StdCmdPaste::StdCmdPaste()
|
|||
|
||||
void StdCmdPaste::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
bool done = getGuiApplication()->sendMsgToActiveView("Paste");
|
||||
if (!done) {
|
||||
QClipboard* cb = QApplication::clipboard();
|
||||
|
@ -927,6 +952,7 @@ StdCmdDuplicateSelection::StdCmdDuplicateSelection()
|
|||
|
||||
void StdCmdDuplicateSelection::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
std::vector<SelectionSingleton::SelObj> sel = Selection().getCompleteSelection();
|
||||
std::set<App::DocumentObject*> unique_objs;
|
||||
std::map< App::Document*, std::vector<App::DocumentObject*> > objs;
|
||||
|
@ -1008,6 +1034,7 @@ StdCmdSelectAll::StdCmdSelectAll()
|
|||
|
||||
void StdCmdSelectAll::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
SelectionSingleton& rSel = Selection();
|
||||
App::Document* doc = App::GetApplication().getActiveDocument();
|
||||
std::vector<App::DocumentObject*> objs = doc->getObjectsOfType(App::DocumentObject::getClassTypeId());
|
||||
|
@ -1041,6 +1068,8 @@ StdCmdDelete::StdCmdDelete()
|
|||
|
||||
void StdCmdDelete::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
// go through all documents
|
||||
const SelectionSingleton& rSel = Selection();
|
||||
const std::vector<App::Document*> docs = App::GetApplication().getDocuments();
|
||||
|
@ -1161,6 +1190,7 @@ StdCmdRefresh::StdCmdRefresh()
|
|||
|
||||
void StdCmdRefresh::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
if (getActiveGuiDocument()) {
|
||||
//Note: Don't add the recompute to undo/redo because it complicates
|
||||
//testing the changes of properties.
|
||||
|
@ -1192,6 +1222,7 @@ StdCmdTransform::StdCmdTransform()
|
|||
|
||||
void StdCmdTransform::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Control().showDialog(new Gui::Dialog::TaskTransform());
|
||||
}
|
||||
|
||||
|
@ -1217,6 +1248,7 @@ StdCmdPlacement::StdCmdPlacement()
|
|||
|
||||
void StdCmdPlacement::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
std::vector<App::DocumentObject*> sel = Gui::Selection().getObjectsOfType(App::GeoFeature::getClassTypeId());
|
||||
Gui::Dialog::TaskPlacement* plm = new Gui::Dialog::TaskPlacement();
|
||||
if (!sel.empty()) {
|
||||
|
@ -1249,6 +1281,7 @@ StdCmdTransformManip::StdCmdTransformManip()
|
|||
|
||||
void StdCmdTransformManip::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
if (getActiveGuiDocument()->getInEdit())
|
||||
getActiveGuiDocument()->resetEdit();
|
||||
std::vector<App::DocumentObject*> sel = Gui::Selection().getObjectsOfType(App::GeoFeature::getClassTypeId());
|
||||
|
@ -1281,6 +1314,7 @@ StdCmdAlignment::StdCmdAlignment()
|
|||
|
||||
void StdCmdAlignment::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
std::vector<App::DocumentObject*> sel = Gui::Selection().getObjectsOfType
|
||||
(App::GeoFeature::getClassTypeId());
|
||||
ManualAlignment* align = ManualAlignment::instance();
|
||||
|
@ -1353,6 +1387,7 @@ StdCmdEdit::StdCmdEdit()
|
|||
|
||||
void StdCmdEdit::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::MDIView* view = Gui::getMainWindow()->activeWindow();
|
||||
if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) {
|
||||
Gui::View3DInventorViewer* viewer = static_cast<Gui::View3DInventor*>(view)->getViewer();
|
||||
|
|
|
@ -57,6 +57,7 @@ StdCmdFeatRecompute::StdCmdFeatRecompute()
|
|||
|
||||
void StdCmdFeatRecompute::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -77,6 +78,8 @@ StdCmdRandomColor::StdCmdRandomColor()
|
|||
|
||||
void StdCmdRandomColor::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
// get the complete selection
|
||||
std::vector<SelectionSingleton::SelObj> sel = Selection().getCompleteSelection();
|
||||
for (std::vector<SelectionSingleton::SelObj>::iterator it = sel.begin(); it != sel.end(); ++it) {
|
||||
|
|
|
@ -55,6 +55,7 @@ StdCmdDlgMacroRecord::StdCmdDlgMacroRecord()
|
|||
|
||||
void StdCmdDlgMacroRecord::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Dialog::DlgMacroRecordImp cDlg(getMainWindow());
|
||||
cDlg.exec();
|
||||
}
|
||||
|
@ -83,6 +84,7 @@ StdCmdMacroStopRecord::StdCmdMacroStopRecord()
|
|||
|
||||
void StdCmdMacroStopRecord::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
getGuiApplication()->macroManager()->commit();
|
||||
}
|
||||
|
||||
|
@ -110,6 +112,7 @@ StdCmdDlgMacroExecute::StdCmdDlgMacroExecute()
|
|||
|
||||
void StdCmdDlgMacroExecute::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Dialog::DlgMacroExecuteImp cDlg(getMainWindow());
|
||||
cDlg.exec();
|
||||
}
|
||||
|
@ -139,6 +142,7 @@ StdCmdDlgMacroExecuteDirect::StdCmdDlgMacroExecuteDirect()
|
|||
|
||||
void StdCmdDlgMacroExecuteDirect::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Run\")");
|
||||
}
|
||||
|
||||
|
@ -164,6 +168,7 @@ StdCmdMacroStartDebug::StdCmdMacroStartDebug()
|
|||
|
||||
void StdCmdMacroStartDebug::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
PythonDebugger* dbg = Application::Instance->macroManager()->debugger();
|
||||
if (!dbg->isRunning())
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"StartDebug\")");
|
||||
|
@ -193,6 +198,7 @@ StdCmdMacroStopDebug::StdCmdMacroStopDebug()
|
|||
|
||||
void StdCmdMacroStopDebug::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Application::Instance->macroManager()->debugger()->tryStop();
|
||||
}
|
||||
|
||||
|
@ -219,6 +225,7 @@ StdCmdMacroStepOver::StdCmdMacroStepOver()
|
|||
|
||||
void StdCmdMacroStepOver::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Application::Instance->macroManager()->debugger()->stepOver();
|
||||
}
|
||||
|
||||
|
@ -245,6 +252,7 @@ StdCmdMacroStepInto::StdCmdMacroStepInto()
|
|||
|
||||
void StdCmdMacroStepInto::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Application::Instance->macroManager()->debugger()->stepInto();
|
||||
}
|
||||
|
||||
|
@ -271,6 +279,7 @@ StdCmdToggleBreakpoint::StdCmdToggleBreakpoint()
|
|||
|
||||
void StdCmdToggleBreakpoint::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ToggleBreakpoint\")");
|
||||
}
|
||||
|
||||
|
|
|
@ -223,6 +223,7 @@ bool StdCmdAbout::isActive()
|
|||
*/
|
||||
void StdCmdAbout::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
const Gui::Dialog::AboutDialogFactory* f = Gui::Dialog::AboutDialogFactory::defaultFactory();
|
||||
boost::scoped_ptr<QDialog> dlg(f->create(getMainWindow()));
|
||||
dlg->exec();
|
||||
|
@ -263,7 +264,8 @@ StdCmdAboutQt::StdCmdAboutQt()
|
|||
|
||||
void StdCmdAboutQt::activated(int iMsg)
|
||||
{
|
||||
qApp->aboutQt();
|
||||
Q_UNUSED(iMsg);
|
||||
qApp->aboutQt();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -286,6 +288,7 @@ StdCmdWhatsThis::StdCmdWhatsThis()
|
|||
|
||||
void StdCmdWhatsThis::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QWhatsThis::enterWhatsThisMode();
|
||||
}
|
||||
|
||||
|
@ -308,9 +311,10 @@ StdCmdDlgParameter::StdCmdDlgParameter()
|
|||
|
||||
void StdCmdDlgParameter::activated(int iMsg)
|
||||
{
|
||||
Gui::Dialog::DlgParameterImp cDlg(getMainWindow());
|
||||
cDlg.resize(QSize(800, 600));
|
||||
cDlg.exec();
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Dialog::DlgParameterImp cDlg(getMainWindow());
|
||||
cDlg.resize(QSize(800, 600));
|
||||
cDlg.exec();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -339,6 +343,7 @@ Action * StdCmdDlgPreferences::createAction(void)
|
|||
|
||||
void StdCmdDlgPreferences::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Dialog::DlgPreferencesImp cDlg(getMainWindow());
|
||||
cDlg.exec();
|
||||
}
|
||||
|
@ -362,6 +367,7 @@ StdCmdDlgCustomize::StdCmdDlgCustomize()
|
|||
|
||||
void StdCmdDlgCustomize::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
static QPointer<QDialog> dlg = 0;
|
||||
if (!dlg)
|
||||
dlg = new Gui::Dialog::DlgCustomizeImp(getMainWindow());
|
||||
|
@ -388,6 +394,7 @@ StdCmdCommandLine::StdCmdCommandLine()
|
|||
|
||||
void StdCmdCommandLine::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
bool show = getMainWindow()->isMaximized ();
|
||||
|
||||
// pop up the Gui command window
|
||||
|
@ -436,6 +443,7 @@ StdCmdOnlineHelp::StdCmdOnlineHelp()
|
|||
|
||||
void StdCmdOnlineHelp::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::getMainWindow()->showDocumentation(QString::fromLatin1("Online_Help_Startpage"));
|
||||
}
|
||||
|
||||
|
@ -458,6 +466,7 @@ StdCmdOnlineHelpWebsite::StdCmdOnlineHelpWebsite()
|
|||
|
||||
void StdCmdOnlineHelpWebsite::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org/wiki/index.php?title=Online_Help_Toc").toStdString();
|
||||
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites");
|
||||
std::string url = hURLGrp->GetASCII("OnlineHelp", defaulturl.c_str());
|
||||
|
@ -485,6 +494,7 @@ StdCmdFreeCADWebsite::StdCmdFreeCADWebsite()
|
|||
|
||||
void StdCmdFreeCADWebsite::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org").toStdString();
|
||||
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites");
|
||||
std::string url = hURLGrp->GetASCII("WebPage", defaulturl.c_str());
|
||||
|
@ -512,6 +522,7 @@ StdCmdFreeCADUserHub::StdCmdFreeCADUserHub()
|
|||
|
||||
void StdCmdFreeCADUserHub::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org/wiki/index.php?title=User_hub").toStdString();
|
||||
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites");
|
||||
std::string url = hURLGrp->GetASCII("Documentation", defaulturl.c_str());
|
||||
|
@ -539,6 +550,7 @@ StdCmdFreeCADPowerUserHub::StdCmdFreeCADPowerUserHub()
|
|||
|
||||
void StdCmdFreeCADPowerUserHub::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org/wiki/index.php?title=Power_users_hub").toStdString();
|
||||
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites");
|
||||
std::string url = hURLGrp->GetASCII("PowerUsers", defaulturl.c_str());
|
||||
|
@ -566,6 +578,7 @@ StdCmdFreeCADForum::StdCmdFreeCADForum()
|
|||
|
||||
void StdCmdFreeCADForum::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
std::string defaulturl = QCoreApplication::translate(this->className(),"http://forum.freecadweb.org").toStdString();
|
||||
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites");
|
||||
std::string url = hURLGrp->GetASCII("UserForum", defaulturl.c_str());
|
||||
|
@ -593,6 +606,7 @@ StdCmdFreeCADFAQ::StdCmdFreeCADFAQ()
|
|||
|
||||
void StdCmdFreeCADFAQ::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org/wiki/index.php?title=FAQ").toStdString();
|
||||
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites");
|
||||
std::string url = hURLGrp->GetASCII("FAQ", defaulturl.c_str());
|
||||
|
@ -620,6 +634,7 @@ StdCmdPythonWebsite::StdCmdPythonWebsite()
|
|||
|
||||
void StdCmdPythonWebsite::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
OpenURLInBrowser("http://python.org");
|
||||
}
|
||||
|
||||
|
@ -643,6 +658,7 @@ StdCmdMeasurementSimple::StdCmdMeasurementSimple()
|
|||
|
||||
void StdCmdMeasurementSimple::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
unsigned int n = getSelection().countObjectsOfType(App::DocumentObject::getClassTypeId());
|
||||
|
||||
if (n == 1) {
|
||||
|
@ -697,6 +713,7 @@ StdCmdUnitsCalculator::StdCmdUnitsCalculator()
|
|||
|
||||
void StdCmdUnitsCalculator::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Dialog::DlgUnitsCalculator *dlg = new Gui::Dialog::DlgUnitsCalculator( getMainWindow() );
|
||||
dlg->show();
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ Std_TestQM::Std_TestQM()
|
|||
|
||||
void Std_TestQM::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QStringList files = QFileDialog::getOpenFileNames(getMainWindow(),
|
||||
QString::fromLatin1("Test translation"), QString(),
|
||||
QString::fromLatin1("Translation (*.qm)"));
|
||||
|
@ -106,6 +107,7 @@ Std_TestReloadQM::Std_TestReloadQM()
|
|||
|
||||
void Std_TestReloadQM::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Translator::instance()->activateLanguage(Translator::instance()->activeLanguage().c_str());
|
||||
}
|
||||
|
||||
|
@ -128,7 +130,7 @@ FCCmdTest1::FCCmdTest1()
|
|||
|
||||
void FCCmdTest1::activated(int iMsg)
|
||||
{
|
||||
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool FCCmdTest1::isActive(void)
|
||||
|
@ -156,8 +158,7 @@ FCCmdTest2::FCCmdTest2()
|
|||
|
||||
void FCCmdTest2::activated(int iMsg)
|
||||
{
|
||||
|
||||
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool FCCmdTest2::isActive(void)
|
||||
|
@ -183,6 +184,7 @@ FCCmdTest3::FCCmdTest3()
|
|||
|
||||
void FCCmdTest3::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
App::Document *pcDoc = getDocument();
|
||||
if (!pcDoc) return;
|
||||
}
|
||||
|
@ -212,6 +214,7 @@ FCCmdTest4::FCCmdTest4()
|
|||
|
||||
void FCCmdTest4::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
App::Document *pcDoc = getDocument();
|
||||
if(!pcDoc) return;
|
||||
}
|
||||
|
@ -240,6 +243,7 @@ FCCmdTest5::FCCmdTest5()
|
|||
|
||||
void FCCmdTest5::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
App::Document *pcDoc = getDocument();
|
||||
if(!pcDoc) return;
|
||||
}
|
||||
|
@ -268,6 +272,7 @@ FCCmdTest6::FCCmdTest6()
|
|||
|
||||
void FCCmdTest6::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
App::Document *pcDoc = getDocument();
|
||||
if(!pcDoc) return;
|
||||
}
|
||||
|
@ -295,6 +300,7 @@ CmdTestProgress1::CmdTestProgress1()
|
|||
|
||||
void CmdTestProgress1::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QMutex mutex;
|
||||
QMutexLocker ml(&mutex);
|
||||
try
|
||||
|
@ -336,6 +342,7 @@ CmdTestProgress2::CmdTestProgress2()
|
|||
|
||||
void CmdTestProgress2::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QMutex mutex;
|
||||
QMutexLocker ml(&mutex);
|
||||
|
||||
|
@ -378,6 +385,7 @@ CmdTestProgress3::CmdTestProgress3()
|
|||
|
||||
void CmdTestProgress3::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QMutex mutex;
|
||||
QMutexLocker ml(&mutex);
|
||||
|
||||
|
@ -447,6 +455,7 @@ CmdTestProgress4::CmdTestProgress4()
|
|||
|
||||
void CmdTestProgress4::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QMutex mutex;
|
||||
QMutexLocker ml(&mutex);
|
||||
|
||||
|
@ -537,6 +546,7 @@ private:
|
|||
|
||||
void CmdTestProgress5::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QEventLoop loop;
|
||||
|
||||
BarThread* thr1 = new BarThread(2000);
|
||||
|
@ -579,6 +589,7 @@ CmdTestMDI1::CmdTestMDI1()
|
|||
|
||||
void CmdTestMDI1::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
MDIView* mdi = getMainWindow()->activeWindow();
|
||||
getMainWindow()->removeWindow(mdi);
|
||||
}
|
||||
|
@ -602,6 +613,7 @@ CmdTestMDI2::CmdTestMDI2()
|
|||
|
||||
void CmdTestMDI2::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QMdiArea* area = getMainWindow()->findChild<QMdiArea*>();
|
||||
if (area) {
|
||||
MDIView* mdi = getMainWindow()->activeWindow();
|
||||
|
@ -629,6 +641,7 @@ CmdTestMDI3::CmdTestMDI3()
|
|||
|
||||
void CmdTestMDI3::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
MDIView* mdi = getMainWindow()->activeWindow();
|
||||
getMainWindow()->removeWindow(mdi);
|
||||
mdi->setParent(0, Qt::Window | Qt::WindowTitleHint |
|
||||
|
@ -728,6 +741,7 @@ public:
|
|||
|
||||
void CmdTestConsoleOutput::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
TestConsoleObserver obs;
|
||||
Base::Console().AttachObserver(&obs);
|
||||
QThreadPool::globalInstance()->start(new ConsoleMessageTask);
|
||||
|
|
|
@ -501,6 +501,7 @@ Action * StdCmdToggleClipPlane::createAction(void)
|
|||
|
||||
void StdCmdToggleClipPlane::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
#if 0
|
||||
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
|
@ -743,6 +744,7 @@ StdCmdToggleVisibility::StdCmdToggleVisibility()
|
|||
|
||||
void StdCmdToggleVisibility::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// go through all documents
|
||||
const std::vector<App::Document*> docs = App::GetApplication().getDocuments();
|
||||
for (std::vector<App::Document*>::const_iterator it = docs.begin(); it != docs.end(); ++it) {
|
||||
|
@ -809,6 +811,7 @@ StdCmdToggleSelectability::StdCmdToggleSelectability()
|
|||
|
||||
void StdCmdToggleSelectability::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// go through all documents
|
||||
const std::vector<App::Document*> docs = App::GetApplication().getDocuments();
|
||||
for (std::vector<App::Document*>::const_iterator it = docs.begin(); it != docs.end(); ++it) {
|
||||
|
@ -854,6 +857,7 @@ StdCmdShowSelection::StdCmdShowSelection()
|
|||
|
||||
void StdCmdShowSelection::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// go through all documents
|
||||
const std::vector<App::Document*> docs = App::GetApplication().getDocuments();
|
||||
for (std::vector<App::Document*>::const_iterator it = docs.begin(); it != docs.end(); ++it) {
|
||||
|
@ -889,6 +893,7 @@ StdCmdHideSelection::StdCmdHideSelection()
|
|||
|
||||
void StdCmdHideSelection::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// go through all documents
|
||||
const std::vector<App::Document*> docs = App::GetApplication().getDocuments();
|
||||
for (std::vector<App::Document*>::const_iterator it = docs.begin(); it != docs.end(); ++it) {
|
||||
|
@ -924,6 +929,7 @@ StdCmdToggleObjects::StdCmdToggleObjects()
|
|||
|
||||
void StdCmdToggleObjects::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// go through active document
|
||||
Gui::Document* doc = Application::Instance->activeDocument();
|
||||
App::Document* app = doc->getDocument();
|
||||
|
@ -963,6 +969,7 @@ StdCmdShowObjects::StdCmdShowObjects()
|
|||
|
||||
void StdCmdShowObjects::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// go through active document
|
||||
Gui::Document* doc = Application::Instance->activeDocument();
|
||||
App::Document* app = doc->getDocument();
|
||||
|
@ -998,6 +1005,7 @@ StdCmdHideObjects::StdCmdHideObjects()
|
|||
|
||||
void StdCmdHideObjects::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// go through active document
|
||||
Gui::Document* doc = Application::Instance->activeDocument();
|
||||
App::Document* app = doc->getDocument();
|
||||
|
@ -1035,6 +1043,7 @@ StdCmdSetAppearance::StdCmdSetAppearance()
|
|||
|
||||
void StdCmdSetAppearance::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
static QPointer<QDialog> dlg = 0;
|
||||
if (!dlg)
|
||||
dlg = new Gui::Dialog::DlgDisplayPropertiesImp(getMainWindow());
|
||||
|
@ -1056,19 +1065,20 @@ DEF_3DV_CMD(StdCmdViewBottom)
|
|||
StdCmdViewBottom::StdCmdViewBottom()
|
||||
: Command("Std_ViewBottom")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Bottom");
|
||||
sToolTipText = QT_TR_NOOP("Set to bottom view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to bottom view");
|
||||
sPixmap = "view-bottom";
|
||||
sAccel = "5";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Bottom");
|
||||
sToolTipText = QT_TR_NOOP("Set to bottom view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to bottom view");
|
||||
sPixmap = "view-bottom";
|
||||
sAccel = "5";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewBottom::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewBottom()");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewBottom()");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1079,19 +1089,20 @@ DEF_3DV_CMD(StdCmdViewFront);
|
|||
StdCmdViewFront::StdCmdViewFront()
|
||||
: Command("Std_ViewFront")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Front");
|
||||
sToolTipText = QT_TR_NOOP("Set to front view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to front view");
|
||||
sPixmap = "view-front";
|
||||
sAccel = "1";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Front");
|
||||
sToolTipText = QT_TR_NOOP("Set to front view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to front view");
|
||||
sPixmap = "view-front";
|
||||
sAccel = "1";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewFront::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewFront()");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewFront()");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1102,19 +1113,20 @@ DEF_3DV_CMD(StdCmdViewLeft);
|
|||
StdCmdViewLeft::StdCmdViewLeft()
|
||||
: Command("Std_ViewLeft")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Left");
|
||||
sToolTipText = QT_TR_NOOP("Set to left view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to left view");
|
||||
sPixmap = "view-left";
|
||||
sAccel = "6";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Left");
|
||||
sToolTipText = QT_TR_NOOP("Set to left view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to left view");
|
||||
sPixmap = "view-left";
|
||||
sAccel = "6";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewLeft::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewLeft()");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewLeft()");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1125,19 +1137,20 @@ DEF_3DV_CMD(StdCmdViewRear);
|
|||
StdCmdViewRear::StdCmdViewRear()
|
||||
: Command("Std_ViewRear")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Rear");
|
||||
sToolTipText = QT_TR_NOOP("Set to rear view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to rear view");
|
||||
sPixmap = "view-rear";
|
||||
sAccel = "4";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Rear");
|
||||
sToolTipText = QT_TR_NOOP("Set to rear view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to rear view");
|
||||
sPixmap = "view-rear";
|
||||
sAccel = "4";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewRear::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRear()");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRear()");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1148,19 +1161,20 @@ DEF_3DV_CMD(StdCmdViewRight);
|
|||
StdCmdViewRight::StdCmdViewRight()
|
||||
: Command("Std_ViewRight")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Right");
|
||||
sToolTipText = QT_TR_NOOP("Set to right view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to right view");
|
||||
sPixmap = "view-right";
|
||||
sAccel = "3";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Right");
|
||||
sToolTipText = QT_TR_NOOP("Set to right view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to right view");
|
||||
sPixmap = "view-right";
|
||||
sAccel = "3";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewRight::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRight()");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRight()");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1171,19 +1185,20 @@ DEF_3DV_CMD(StdCmdViewTop);
|
|||
StdCmdViewTop::StdCmdViewTop()
|
||||
: Command("Std_ViewTop")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Top");
|
||||
sToolTipText = QT_TR_NOOP("Set to top view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to top view");
|
||||
sPixmap = "view-top";
|
||||
sAccel = "2";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Top");
|
||||
sToolTipText = QT_TR_NOOP("Set to top view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to top view");
|
||||
sPixmap = "view-top";
|
||||
sAccel = "2";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewTop::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewTop()");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewTop()");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1194,19 +1209,20 @@ DEF_3DV_CMD(StdCmdViewAxo);
|
|||
StdCmdViewAxo::StdCmdViewAxo()
|
||||
: Command("Std_ViewAxo")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Axonometric");
|
||||
sToolTipText= QT_TR_NOOP("Set to axonometric view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to axonometric view");
|
||||
sPixmap = "view-axonometric";
|
||||
sAccel = "0";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Axonometric");
|
||||
sToolTipText= QT_TR_NOOP("Set to axonometric view");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Set to axonometric view");
|
||||
sPixmap = "view-axonometric";
|
||||
sAccel = "0";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewAxo::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewAxonometric()");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewAxonometric()");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1217,19 +1233,20 @@ DEF_3DV_CMD(StdCmdViewRotateLeft);
|
|||
StdCmdViewRotateLeft::StdCmdViewRotateLeft()
|
||||
: Command("Std_ViewRotateLeft")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Rotate Left");
|
||||
sToolTipText = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 counter-clockwise");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 counter-clockwise");
|
||||
sPixmap = "view-rotate-left";
|
||||
//sAccel = "Shift Left";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Rotate Left");
|
||||
sToolTipText = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 counter-clockwise");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 counter-clockwise");
|
||||
sPixmap = "view-rotate-left";
|
||||
//sAccel = "Shift Left";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewRotateLeft::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateLeft()");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateLeft()");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1241,19 +1258,20 @@ DEF_3DV_CMD(StdCmdViewRotateRight);
|
|||
StdCmdViewRotateRight::StdCmdViewRotateRight()
|
||||
: Command("Std_ViewRotateRight")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Rotate Right");
|
||||
sToolTipText = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 clockwise");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 clockwise");
|
||||
sPixmap = "view-rotate-right";
|
||||
//sAccel = "Shift Right";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Rotate Right");
|
||||
sToolTipText = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 clockwise");
|
||||
sWhatsThis = "Std_ViewXX";
|
||||
sStatusTip = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 clockwise");
|
||||
sPixmap = "view-rotate-right";
|
||||
//sAccel = "Shift Right";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewRotateRight::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateRight()");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateRight()");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1276,6 +1294,7 @@ StdCmdViewFitAll::StdCmdViewFitAll()
|
|||
|
||||
void StdCmdViewFitAll::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
//doCommand(Command::Gui,"Gui.activeDocument().activeView().fitAll()");
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewFit\")");
|
||||
}
|
||||
|
@ -1307,6 +1326,7 @@ StdCmdViewFitSelection::StdCmdViewFitSelection()
|
|||
|
||||
void StdCmdViewFitSelection::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
//doCommand(Command::Gui,"Gui.activeDocument().activeView().fitAll()");
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewSelection\")");
|
||||
}
|
||||
|
@ -1336,6 +1356,7 @@ StdViewDock::StdViewDock()
|
|||
|
||||
void StdViewDock::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdViewDock::isActive(void)
|
||||
|
@ -1363,6 +1384,7 @@ StdViewUndock::StdViewUndock()
|
|||
|
||||
void StdViewUndock::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdViewUndock::isActive(void)
|
||||
|
@ -1391,6 +1413,7 @@ StdViewFullscreen::StdViewFullscreen()
|
|||
|
||||
void StdViewFullscreen::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdViewFullscreen::isActive(void)
|
||||
|
@ -1497,6 +1520,7 @@ StdCmdViewVR::StdCmdViewVR()
|
|||
|
||||
void StdCmdViewVR::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
//doCommand(Command::Gui,"Gui.activeDocument().activeView().fitAll()");
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewVR\")");
|
||||
}
|
||||
|
@ -1527,6 +1551,7 @@ StdViewScreenShot::StdViewScreenShot()
|
|||
|
||||
void StdViewScreenShot::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
QStringList formats;
|
||||
|
@ -1645,6 +1670,7 @@ StdCmdViewCreate::StdCmdViewCreate()
|
|||
|
||||
void StdCmdViewCreate::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
getActiveGuiDocument()->createView(View3DInventor::getClassTypeId());
|
||||
getActiveGuiDocument()->getActiveView()->viewAll();
|
||||
}
|
||||
|
@ -1674,6 +1700,7 @@ StdCmdToggleNavigation::StdCmdToggleNavigation()
|
|||
|
||||
void StdCmdToggleNavigation::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::MDIView* view = Gui::getMainWindow()->activeWindow();
|
||||
if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) {
|
||||
Gui::View3DInventorViewer* viewer = static_cast<Gui::View3DInventor*>(view)->getViewer();
|
||||
|
@ -1800,13 +1827,14 @@ StdCmdAxisCross::StdCmdAxisCross()
|
|||
|
||||
void StdCmdAxisCross::activated(int iMsg)
|
||||
{
|
||||
Gui::View3DInventor* view = qobject_cast<View3DInventor*>(Gui::getMainWindow()->activeWindow());
|
||||
if (view ){
|
||||
if(view->getViewer()->hasAxisCross()== false)
|
||||
doCommand(Command::Gui,"Gui.ActiveDocument.ActiveView.setAxisCross(True)");
|
||||
else
|
||||
doCommand(Command::Gui,"Gui.ActiveDocument.ActiveView.setAxisCross(False)");
|
||||
}
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::View3DInventor* view = qobject_cast<View3DInventor*>(Gui::getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
if(view->getViewer()->hasAxisCross()== false)
|
||||
doCommand(Command::Gui,"Gui.ActiveDocument.ActiveView.setAxisCross(True)");
|
||||
else
|
||||
doCommand(Command::Gui,"Gui.ActiveDocument.ActiveView.setAxisCross(False)");
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdAxisCross::isActive(void)
|
||||
|
@ -1835,24 +1863,26 @@ DEF_STD_CMD_A(StdCmdViewExample1);
|
|||
StdCmdViewExample1::StdCmdViewExample1()
|
||||
: Command("Std_ViewExample1")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Inventor example #1");
|
||||
sToolTipText = QT_TR_NOOP("Shows a 3D texture with manipulator");
|
||||
sWhatsThis = "Std_ViewExamples";
|
||||
sStatusTip = QT_TR_NOOP("Shows a 3D texture with manipulator");
|
||||
sPixmap = "Std_Tool1";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Inventor example #1");
|
||||
sToolTipText = QT_TR_NOOP("Shows a 3D texture with manipulator");
|
||||
sWhatsThis = "Std_ViewExamples";
|
||||
sStatusTip = QT_TR_NOOP("Shows a 3D texture with manipulator");
|
||||
sPixmap = "Std_Tool1";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewExample1::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example1\")");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example1\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewExample1::isActive(void)
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Example1");
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Example1");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Std_ViewExample2
|
||||
//===========================================================================
|
||||
|
@ -1861,23 +1891,24 @@ DEF_STD_CMD_A(StdCmdViewExample2);
|
|||
StdCmdViewExample2::StdCmdViewExample2()
|
||||
: Command("Std_ViewExample2")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Inventor example #2");
|
||||
sToolTipText = QT_TR_NOOP("Shows spheres and drag-lights");
|
||||
sWhatsThis = "Std_ViewExamples";
|
||||
sStatusTip = QT_TR_NOOP("Shows spheres and drag-lights");
|
||||
sPixmap = "Std_Tool2";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Inventor example #2");
|
||||
sToolTipText = QT_TR_NOOP("Shows spheres and drag-lights");
|
||||
sWhatsThis = "Std_ViewExamples";
|
||||
sStatusTip = QT_TR_NOOP("Shows spheres and drag-lights");
|
||||
sPixmap = "Std_Tool2";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewExample2::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example2\")");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example2\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewExample2::isActive(void)
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Example2");
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Example2");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1888,23 +1919,24 @@ DEF_STD_CMD_A(StdCmdViewExample3);
|
|||
StdCmdViewExample3::StdCmdViewExample3()
|
||||
: Command("Std_ViewExample3")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Inventor example #3");
|
||||
sToolTipText = QT_TR_NOOP("Shows a animated texture");
|
||||
sWhatsThis = "Std_ViewExamples";
|
||||
sStatusTip = QT_TR_NOOP("Shows a animated texture");
|
||||
sPixmap = "Std_Tool3";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Inventor example #3");
|
||||
sToolTipText = QT_TR_NOOP("Shows a animated texture");
|
||||
sWhatsThis = "Std_ViewExamples";
|
||||
sStatusTip = QT_TR_NOOP("Shows a animated texture");
|
||||
sPixmap = "Std_Tool3";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewExample3::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example3\")");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example3\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewExample3::isActive(void)
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Example3");
|
||||
return getGuiApplication()->sendHasMsgToActiveView("Example3");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1916,23 +1948,24 @@ DEF_STD_CMD_A(StdCmdViewIvStereoOff);
|
|||
StdCmdViewIvStereoOff::StdCmdViewIvStereoOff()
|
||||
: Command("Std_ViewIvStereoOff")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Stereo Off");
|
||||
sToolTipText = QT_TR_NOOP("Switch stereo viewing off");
|
||||
sWhatsThis = "Std_ViewIvStereo";
|
||||
sStatusTip = QT_TR_NOOP("Switch stereo viewing off");
|
||||
sPixmap = "Std_Tool6";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Stereo Off");
|
||||
sToolTipText = QT_TR_NOOP("Switch stereo viewing off");
|
||||
sWhatsThis = "Std_ViewIvStereo";
|
||||
sStatusTip = QT_TR_NOOP("Switch stereo viewing off");
|
||||
sPixmap = "Std_Tool6";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewIvStereoOff::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"None\")");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"None\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewIvStereoOff::isActive(void)
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoOff");
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoOff");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1944,23 +1977,24 @@ DEF_STD_CMD_A(StdCmdViewIvStereoRedGreen);
|
|||
StdCmdViewIvStereoRedGreen::StdCmdViewIvStereoRedGreen()
|
||||
: Command("Std_ViewIvStereoRedGreen")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Stereo red/cyan");
|
||||
sToolTipText = QT_TR_NOOP("Switch stereo viewing to red/cyan");
|
||||
sWhatsThis = "Std_ViewIvStereo";
|
||||
sStatusTip = QT_TR_NOOP("Switch stereo viewing to red/cyan");
|
||||
sPixmap = "Std_Tool7";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Stereo red/cyan");
|
||||
sToolTipText = QT_TR_NOOP("Switch stereo viewing to red/cyan");
|
||||
sWhatsThis = "Std_ViewIvStereo";
|
||||
sStatusTip = QT_TR_NOOP("Switch stereo viewing to red/cyan");
|
||||
sPixmap = "Std_Tool7";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewIvStereoRedGreen::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"Anaglyph\")");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"Anaglyph\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewIvStereoRedGreen::isActive(void)
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoRedGreen");
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoRedGreen");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1971,23 +2005,24 @@ DEF_STD_CMD_A(StdCmdViewIvStereoQuadBuff);
|
|||
StdCmdViewIvStereoQuadBuff::StdCmdViewIvStereoQuadBuff()
|
||||
: Command("Std_ViewIvStereoQuadBuff")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Stereo quad buffer");
|
||||
sToolTipText = QT_TR_NOOP("Switch stereo viewing to quad buffer");
|
||||
sWhatsThis = "Std_ViewIvStereo";
|
||||
sStatusTip = QT_TR_NOOP("Switch stereo viewing to quad buffer");
|
||||
sPixmap = "Std_Tool7";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Stereo quad buffer");
|
||||
sToolTipText = QT_TR_NOOP("Switch stereo viewing to quad buffer");
|
||||
sWhatsThis = "Std_ViewIvStereo";
|
||||
sStatusTip = QT_TR_NOOP("Switch stereo viewing to quad buffer");
|
||||
sPixmap = "Std_Tool7";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewIvStereoQuadBuff::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"QuadBuffer\")");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"QuadBuffer\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewIvStereoQuadBuff::isActive(void)
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoQuadBuff");
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoQuadBuff");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1998,23 +2033,24 @@ DEF_STD_CMD_A(StdCmdViewIvStereoInterleavedRows);
|
|||
StdCmdViewIvStereoInterleavedRows::StdCmdViewIvStereoInterleavedRows()
|
||||
: Command("Std_ViewIvStereoInterleavedRows")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Stereo Interleaved Rows");
|
||||
sToolTipText = QT_TR_NOOP("Switch stereo viewing to Interleaved Rows");
|
||||
sWhatsThis = "Std_ViewIvStereo";
|
||||
sStatusTip = QT_TR_NOOP("Switch stereo viewing to Interleaved Rows");
|
||||
sPixmap = "Std_Tool7";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Stereo Interleaved Rows");
|
||||
sToolTipText = QT_TR_NOOP("Switch stereo viewing to Interleaved Rows");
|
||||
sWhatsThis = "Std_ViewIvStereo";
|
||||
sStatusTip = QT_TR_NOOP("Switch stereo viewing to Interleaved Rows");
|
||||
sPixmap = "Std_Tool7";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewIvStereoInterleavedRows::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedRows\")");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedRows\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewIvStereoInterleavedRows::isActive(void)
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedRows");
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedRows");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -2025,23 +2061,24 @@ DEF_STD_CMD_A(StdCmdViewIvStereoInterleavedColumns);
|
|||
StdCmdViewIvStereoInterleavedColumns::StdCmdViewIvStereoInterleavedColumns()
|
||||
: Command("Std_ViewIvStereoInterleavedColumns")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Stereo Interleaved Columns");
|
||||
sToolTipText = QT_TR_NOOP("Switch stereo viewing to Interleaved Columns");
|
||||
sWhatsThis = "Std_ViewIvStereo";
|
||||
sStatusTip = QT_TR_NOOP("Switch stereo viewing to Interleaved Columns");
|
||||
sPixmap = "Std_Tool7";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Stereo Interleaved Columns");
|
||||
sToolTipText = QT_TR_NOOP("Switch stereo viewing to Interleaved Columns");
|
||||
sWhatsThis = "Std_ViewIvStereo";
|
||||
sStatusTip = QT_TR_NOOP("Switch stereo viewing to Interleaved Columns");
|
||||
sPixmap = "Std_Tool7";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewIvStereoInterleavedColumns::activated(int iMsg)
|
||||
{
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedColumns\")");
|
||||
Q_UNUSED(iMsg);
|
||||
doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedColumns\")");
|
||||
}
|
||||
|
||||
bool StdCmdViewIvStereoInterleavedColumns::isActive(void)
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedColumns");
|
||||
return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedColumns");
|
||||
}
|
||||
|
||||
|
||||
|
@ -2053,44 +2090,45 @@ DEF_STD_CMD_A(StdCmdViewIvIssueCamPos);
|
|||
StdCmdViewIvIssueCamPos::StdCmdViewIvIssueCamPos()
|
||||
: Command("Std_ViewIvIssueCamPos")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Issue camera position");
|
||||
sToolTipText = QT_TR_NOOP("Issue the camera position to the console and to a macro, to easily recall this position");
|
||||
sWhatsThis = "Std_ViewIvIssueCamPos";
|
||||
sStatusTip = QT_TR_NOOP("Issue the camera position to the console and to a macro, to easily recall this position");
|
||||
sPixmap = "Std_Tool8";
|
||||
eType = Alter3DView;
|
||||
sGroup = QT_TR_NOOP("Standard-View");
|
||||
sMenuText = QT_TR_NOOP("Issue camera position");
|
||||
sToolTipText = QT_TR_NOOP("Issue the camera position to the console and to a macro, to easily recall this position");
|
||||
sWhatsThis = "Std_ViewIvIssueCamPos";
|
||||
sStatusTip = QT_TR_NOOP("Issue the camera position to the console and to a macro, to easily recall this position");
|
||||
sPixmap = "Std_Tool8";
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdCmdViewIvIssueCamPos::activated(int iMsg)
|
||||
{
|
||||
std::string Temp,Temp2;
|
||||
std::string::size_type pos;
|
||||
Q_UNUSED(iMsg);
|
||||
std::string Temp,Temp2;
|
||||
std::string::size_type pos;
|
||||
|
||||
const char* ppReturn=0;
|
||||
getGuiApplication()->sendMsgToActiveView("GetCamera",&ppReturn);
|
||||
const char* ppReturn=0;
|
||||
getGuiApplication()->sendMsgToActiveView("GetCamera",&ppReturn);
|
||||
|
||||
// remove the #inventor line...
|
||||
Temp2 = ppReturn;
|
||||
pos = Temp2.find_first_of("\n");
|
||||
Temp2.erase(0,pos);
|
||||
// remove the #inventor line...
|
||||
Temp2 = ppReturn;
|
||||
pos = Temp2.find_first_of("\n");
|
||||
Temp2.erase(0,pos);
|
||||
|
||||
// remove all returns
|
||||
while((pos=Temp2.find('\n')) != std::string::npos)
|
||||
Temp2.replace(pos,1," ");
|
||||
// remove all returns
|
||||
while((pos=Temp2.find('\n')) != std::string::npos)
|
||||
Temp2.replace(pos,1," ");
|
||||
|
||||
// build up the command string
|
||||
Temp += "Gui.SendMsgToActiveView(\"SetCamera ";
|
||||
Temp += Temp2;
|
||||
Temp += "\")";
|
||||
// build up the command string
|
||||
Temp += "Gui.SendMsgToActiveView(\"SetCamera ";
|
||||
Temp += Temp2;
|
||||
Temp += "\")";
|
||||
|
||||
Base::Console().Message("%s\n",Temp2.c_str());
|
||||
getGuiApplication()->macroManager()->addLine(MacroManager::Gui,Temp.c_str());
|
||||
Base::Console().Message("%s\n",Temp2.c_str());
|
||||
getGuiApplication()->macroManager()->addLine(MacroManager::Gui,Temp.c_str());
|
||||
}
|
||||
|
||||
bool StdCmdViewIvIssueCamPos::isActive(void)
|
||||
{
|
||||
return getGuiApplication()->sendHasMsgToActiveView("GetCamera");
|
||||
return getGuiApplication()->sendHasMsgToActiveView("GetCamera");
|
||||
}
|
||||
|
||||
|
||||
|
@ -2116,6 +2154,7 @@ StdViewZoomIn::StdViewZoomIn()
|
|||
|
||||
void StdViewZoomIn::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if ( view ) {
|
||||
View3DInventorViewer* viewer = view->getViewer();
|
||||
|
@ -2150,6 +2189,7 @@ StdViewZoomOut::StdViewZoomOut()
|
|||
|
||||
void StdViewZoomOut::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
View3DInventorViewer* viewer = view->getViewer();
|
||||
|
@ -2184,6 +2224,7 @@ StdViewBoxZoom::StdViewBoxZoom()
|
|||
|
||||
void StdViewBoxZoom::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if ( view ) {
|
||||
View3DInventorViewer* viewer = view->getViewer();
|
||||
|
@ -2265,6 +2306,7 @@ static void selectionCallback(void * ud, SoEventCallback * cb)
|
|||
|
||||
void StdBoxSelection::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
View3DInventor* view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
View3DInventorViewer* viewer = view->getViewer();
|
||||
|
@ -2296,6 +2338,7 @@ StdCmdTreeSelection::StdCmdTreeSelection()
|
|||
|
||||
void StdCmdTreeSelection::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
QList<TreeWidget*> tree = Gui::getMainWindow()->findChildren<TreeWidget*>();
|
||||
for (QList<TreeWidget*>::iterator it = tree.begin(); it != tree.end(); ++it) {
|
||||
Gui::Document* doc = Gui::Application::Instance->activeDocument();
|
||||
|
@ -2362,6 +2405,7 @@ static const char * cursor_ruler[] = {
|
|||
" + "};
|
||||
void StdCmdMeasureDistance::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Document* doc = Gui::Application::Instance->activeDocument();
|
||||
Gui::View3DInventor* view = static_cast<Gui::View3DInventor*>(doc->getActiveView());
|
||||
if (view) {
|
||||
|
@ -2412,6 +2456,7 @@ StdCmdSceneInspector::StdCmdSceneInspector()
|
|||
|
||||
void StdCmdSceneInspector::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
View3DInventor* child = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if (child) {
|
||||
View3DInventorViewer* viewer = child->getViewer();
|
||||
|
@ -2444,6 +2489,7 @@ StdCmdTextureMapping::StdCmdTextureMapping()
|
|||
|
||||
void StdCmdTextureMapping::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Control().showDialog(new Gui::Dialog::TaskTextureMapping);
|
||||
}
|
||||
|
||||
|
@ -2469,6 +2515,7 @@ StdCmdDemoMode::StdCmdDemoMode()
|
|||
|
||||
void StdCmdDemoMode::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
static QPointer<QDialog> dlg = 0;
|
||||
if (!dlg)
|
||||
dlg = new Gui::Dialog::DemoMode(getMainWindow());
|
||||
|
@ -2495,14 +2542,15 @@ CmdViewMeasureClearAll::CmdViewMeasureClearAll()
|
|||
|
||||
void CmdViewMeasureClearAll::activated(int iMsg)
|
||||
{
|
||||
Gui::View3DInventor *view = dynamic_cast<Gui::View3DInventor*>(Gui::Application::Instance->
|
||||
activeDocument()->getActiveView());
|
||||
if (!view)
|
||||
return;
|
||||
Gui::View3DInventorViewer *viewer = view->getViewer();
|
||||
if (!viewer)
|
||||
return;
|
||||
viewer->eraseAllDimensions();
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::View3DInventor *view = dynamic_cast<Gui::View3DInventor*>(Gui::Application::Instance->
|
||||
activeDocument()->getActiveView());
|
||||
if (!view)
|
||||
return;
|
||||
Gui::View3DInventorViewer *viewer = view->getViewer();
|
||||
if (!viewer)
|
||||
return;
|
||||
viewer->eraseAllDimensions();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -2514,23 +2562,24 @@ DEF_STD_CMD(CmdViewMeasureToggleAll);
|
|||
CmdViewMeasureToggleAll::CmdViewMeasureToggleAll()
|
||||
: Command("View_Measure_Toggle_All")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Measure");
|
||||
sMenuText = QT_TR_NOOP("Toggle measurement");
|
||||
sToolTipText = QT_TR_NOOP("Toggle measurement");
|
||||
sWhatsThis = "View_Measure_Toggle_All";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Part_Measure_Toggle_All";
|
||||
sGroup = QT_TR_NOOP("Measure");
|
||||
sMenuText = QT_TR_NOOP("Toggle measurement");
|
||||
sToolTipText = QT_TR_NOOP("Toggle measurement");
|
||||
sWhatsThis = "View_Measure_Toggle_All";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Part_Measure_Toggle_All";
|
||||
}
|
||||
|
||||
void CmdViewMeasureToggleAll::activated(int iMsg)
|
||||
{
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("View");
|
||||
bool visibility = group->GetBool("DimensionsVisible", true);
|
||||
if (visibility)
|
||||
group->SetBool("DimensionsVisible", false);
|
||||
else
|
||||
group->SetBool("DimensionsVisible", true);
|
||||
Q_UNUSED(iMsg);
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("View");
|
||||
bool visibility = group->GetBool("DimensionsVisible", true);
|
||||
if (visibility)
|
||||
group->SetBool("DimensionsVisible", false);
|
||||
else
|
||||
group->SetBool("DimensionsVisible", true);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -60,6 +60,7 @@ StdCmdArrangeIcons::StdCmdArrangeIcons()
|
|||
|
||||
void StdCmdArrangeIcons::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
getMainWindow()->arrangeIcons ();
|
||||
}
|
||||
|
||||
|
@ -87,6 +88,7 @@ StdCmdTileWindows::StdCmdTileWindows()
|
|||
|
||||
void StdCmdTileWindows::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
getMainWindow()->tile();
|
||||
}
|
||||
|
||||
|
@ -114,6 +116,7 @@ StdCmdCascadeWindows::StdCmdCascadeWindows()
|
|||
|
||||
void StdCmdCascadeWindows::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
getMainWindow()->cascade();
|
||||
}
|
||||
|
||||
|
@ -143,6 +146,7 @@ StdCmdCloseActiveWindow::StdCmdCloseActiveWindow()
|
|||
|
||||
void StdCmdCloseActiveWindow::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
getMainWindow()->closeActiveWindow();
|
||||
}
|
||||
|
||||
|
@ -169,6 +173,7 @@ StdCmdCloseAllWindows::StdCmdCloseAllWindows()
|
|||
|
||||
void StdCmdCloseAllWindows::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
getMainWindow()->closeAllWindows();
|
||||
}
|
||||
|
||||
|
@ -197,6 +202,7 @@ StdCmdActivateNextWindow::StdCmdActivateNextWindow()
|
|||
|
||||
void StdCmdActivateNextWindow::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
getMainWindow()->activateNextWindow();
|
||||
}
|
||||
|
||||
|
@ -225,6 +231,7 @@ StdCmdActivatePrevWindow::StdCmdActivatePrevWindow()
|
|||
|
||||
void StdCmdActivatePrevWindow::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
getMainWindow()->activatePreviousWindow();
|
||||
}
|
||||
|
||||
|
@ -252,6 +259,7 @@ StdCmdWindows::StdCmdWindows()
|
|||
|
||||
void StdCmdWindows::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::Dialog::DlgActivateWindowImp dlg( getMainWindow() );
|
||||
dlg.exec();
|
||||
}
|
||||
|
@ -297,6 +305,7 @@ StdCmdDockViewMenu::StdCmdDockViewMenu()
|
|||
void StdCmdDockViewMenu::activated(int iMsg)
|
||||
{
|
||||
// Handled by the related QAction objects
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdCmdDockViewMenu::isActive(void)
|
||||
|
@ -332,6 +341,7 @@ StdCmdToolBarMenu::StdCmdToolBarMenu()
|
|||
void StdCmdToolBarMenu::activated(int iMsg)
|
||||
{
|
||||
// Handled by the related QAction objects
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdCmdToolBarMenu::isActive(void)
|
||||
|
@ -411,6 +421,7 @@ StdCmdWindowsMenu::StdCmdWindowsMenu()
|
|||
void StdCmdWindowsMenu::activated(int iMsg)
|
||||
{
|
||||
// already handled by the main window
|
||||
Q_UNUSED(iMsg);
|
||||
}
|
||||
|
||||
bool StdCmdWindowsMenu::isActive(void)
|
||||
|
|
|
@ -70,6 +70,7 @@ FilterTyped::FilterTyped(const std::string &typeIn) : FilterBase(), type(typeIn)
|
|||
|
||||
bool FilterTyped::goFilter(const Gui::DAG::Vertex& vertexIn, const Graph& graphIn, const GraphLinkContainer& linkIn) const
|
||||
{
|
||||
Q_UNUSED(graphIn);
|
||||
if (type.empty())
|
||||
return false;
|
||||
Base::Type theType = Base::Type::fromName(type.c_str());
|
||||
|
|
|
@ -220,6 +220,7 @@ namespace Gui
|
|||
template<typename TVertex, typename TGraph>
|
||||
void discover_vertex(TVertex vertex, TGraph &graph)
|
||||
{
|
||||
Q_UNUSED(graph);
|
||||
vertices.push_back(vertex);
|
||||
}
|
||||
private:
|
||||
|
|
|
@ -42,6 +42,8 @@ RectItem::RectItem(QGraphicsItem* parent) : QGraphicsRectItem(parent)
|
|||
|
||||
void RectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(widget);
|
||||
painter->save();
|
||||
|
||||
QStyleOptionViewItemV4 styleOption;
|
||||
|
|
|
@ -45,7 +45,7 @@ using namespace Gui::Dialog;
|
|||
|
||||
/* TRANSLATOR Gui::Dialog::DemoMode */
|
||||
|
||||
DemoMode::DemoMode(QWidget* parent, Qt::WindowFlags fl)
|
||||
DemoMode::DemoMode(QWidget* /*parent*/, Qt::WindowFlags fl)
|
||||
: QDialog(0, fl|Qt::WindowStaysOnTopHint), viewAxis(0,0,-1), ui(new Ui_DemoMode)
|
||||
{
|
||||
// create widgets
|
||||
|
@ -184,6 +184,7 @@ void DemoMode::reorientCamera(SoCamera * cam, const SbRotation & rot)
|
|||
|
||||
void DemoMode::on_speedSlider_valueChanged(int v)
|
||||
{
|
||||
Q_UNUSED(v);
|
||||
Gui::View3DInventor* view = activeView();
|
||||
if (view && view->getViewer()->isAnimating()) {
|
||||
startAnimation(view);
|
||||
|
|
|
@ -304,16 +304,19 @@ void DlgCustomizeSpNavSettings::on_SliderSpin_sliderReleased()
|
|||
void DlgCustomizeSpNavSettings::onAddMacroAction(const QByteArray ¯oName)
|
||||
{
|
||||
//don't need to do anything here.
|
||||
Q_UNUSED(macroName);
|
||||
}
|
||||
|
||||
void DlgCustomizeSpNavSettings::onRemoveMacroAction(const QByteArray ¯oName)
|
||||
{
|
||||
//don't need to do anything here.
|
||||
Q_UNUSED(macroName);
|
||||
}
|
||||
|
||||
void DlgCustomizeSpNavSettings::onModifyMacroAction(const QByteArray ¯oName)
|
||||
{
|
||||
//don't need to do anything here.
|
||||
Q_UNUSED(macroName);
|
||||
}
|
||||
|
||||
#include "moc_DlgCustomizeSpNavSettings.cpp"
|
||||
|
|
|
@ -59,6 +59,7 @@ void ButtonView::selectButton(int number)
|
|||
|
||||
void ButtonView::goSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
|
||||
{
|
||||
Q_UNUSED(deselected);
|
||||
if (selected.indexes().isEmpty())
|
||||
return;
|
||||
QModelIndex select(selected.indexes().at(0));
|
||||
|
@ -82,6 +83,7 @@ ButtonModel::ButtonModel(QObject *parent) : QAbstractListModel(parent)
|
|||
|
||||
int ButtonModel::rowCount (const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return spaceballButtonGroup()->GetGroups().size();
|
||||
}
|
||||
|
||||
|
@ -278,6 +280,7 @@ int CommandModel::rowCount(const QModelIndex &parent) const
|
|||
|
||||
int CommandModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -474,11 +477,13 @@ PrintModel::PrintModel(QObject *parent, ButtonModel *buttonModelIn, CommandModel
|
|||
|
||||
int PrintModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return buttonModel->rowCount();
|
||||
}
|
||||
|
||||
int PrintModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -712,6 +717,7 @@ void DlgCustomizeSpaceball::onRemoveMacroAction(const QByteArray ¯oName)
|
|||
void DlgCustomizeSpaceball::onModifyMacroAction(const QByteArray ¯oName)
|
||||
{
|
||||
//don't think I need to do anything here.
|
||||
Q_UNUSED(macroName);
|
||||
}
|
||||
|
||||
#include "moc_DlgCustomizeSpaceball.cpp"
|
||||
|
|
|
@ -122,6 +122,7 @@ void DlgDisplayPropertiesImp::changeEvent(QEvent *e)
|
|||
void DlgDisplayPropertiesImp::OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
|
||||
Gui::SelectionSingleton::MessageType Reason)
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
if (Reason.Type == SelectionChanges::AddSelection ||
|
||||
Reason.Type == SelectionChanges::RmvSelection ||
|
||||
Reason.Type == SelectionChanges::SetSelection ||
|
||||
|
|
|
@ -119,6 +119,7 @@ DlgCustomKeyboardImp::~DlgCustomKeyboardImp()
|
|||
|
||||
void DlgCustomKeyboardImp::showEvent(QShowEvent* e)
|
||||
{
|
||||
Q_UNUSED(e);
|
||||
// If we did this already in the constructor we wouldn't get the vertical scrollbar if needed.
|
||||
// The problem was noticed with Qt 4.1.4 but may arise with any later version.
|
||||
if (firstShow) {
|
||||
|
|
|
@ -114,6 +114,8 @@ void DlgRunExternal::advanced (void)
|
|||
|
||||
void DlgRunExternal::finished (int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
Q_UNUSED(exitCode);
|
||||
Q_UNUSED(exitStatus);
|
||||
ui->buttonAccept->setEnabled(true);
|
||||
ui->buttonDiscard->setEnabled(true);
|
||||
ui->buttonAbort->setEnabled(false);
|
||||
|
|
|
@ -118,19 +118,23 @@ void DlgWorkbenchesImp::changeEvent(QEvent *e)
|
|||
|
||||
void DlgWorkbenchesImp::hideEvent(QHideEvent * event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
save_workbenches();
|
||||
}
|
||||
|
||||
void DlgWorkbenchesImp::onAddMacroAction(const QByteArray& macro)
|
||||
{
|
||||
Q_UNUSED(macro);
|
||||
}
|
||||
|
||||
void DlgWorkbenchesImp::onRemoveMacroAction(const QByteArray& macro)
|
||||
{
|
||||
Q_UNUSED(macro);
|
||||
}
|
||||
|
||||
void DlgWorkbenchesImp::onModifyMacroAction(const QByteArray& macro)
|
||||
{
|
||||
Q_UNUSED(macro);
|
||||
}
|
||||
|
||||
void DlgWorkbenchesImp::move_workbench(QListWidgetCustom *lwc_dest,
|
||||
|
|
|
@ -68,9 +68,9 @@ public:
|
|||
/// returns the name of the view (important for messages)
|
||||
virtual const char *getName(void) const { return "DockWindow"; }
|
||||
/// Message handler
|
||||
virtual bool onMsg(const char* pMsg,const char** ppReturn){ return false; }
|
||||
virtual bool onMsg(const char* ,const char** ){ return false; }
|
||||
/// Message handler test
|
||||
virtual bool onHasMsg(const char* pMsg) const { return false; }
|
||||
virtual bool onHasMsg(const char*) const { return false; }
|
||||
/// overwrite when checking on close state
|
||||
virtual bool canClose(void){return true;}
|
||||
//@}
|
||||
|
|
|
@ -82,9 +82,13 @@ namespace Gui {
|
|||
int childCount() const
|
||||
{ return childItems.count(); }
|
||||
virtual QVariant data(int role) const
|
||||
{ return QVariant(); }
|
||||
{
|
||||
Q_UNUSED(role);
|
||||
return QVariant();
|
||||
}
|
||||
virtual bool setData (const QVariant & value, int role)
|
||||
{
|
||||
Q_UNUSED(value);
|
||||
if (role == Qt::EditRole) {
|
||||
return true;
|
||||
}
|
||||
|
@ -404,6 +408,7 @@ void DocumentModel::slotDeleteDocument(const Gui::Document& Doc)
|
|||
|
||||
void DocumentModel::slotRenameDocument(const Gui::Document& Doc)
|
||||
{
|
||||
Q_UNUSED(Doc);
|
||||
// do nothing here
|
||||
}
|
||||
|
||||
|
@ -428,10 +433,12 @@ void DocumentModel::slotActiveDocument(const Gui::Document& /*Doc*/)
|
|||
|
||||
void DocumentModel::slotInEdit(const Gui::ViewProviderDocumentObject& v)
|
||||
{
|
||||
Q_UNUSED(v);
|
||||
}
|
||||
|
||||
void DocumentModel::slotResetEdit(const Gui::ViewProviderDocumentObject& v)
|
||||
{
|
||||
Q_UNUSED(v);
|
||||
}
|
||||
|
||||
void DocumentModel::slotNewObject(const Gui::ViewProviderDocumentObject& obj)
|
||||
|
@ -540,11 +547,13 @@ void DocumentModel::slotChangeObject(const Gui::ViewProviderDocumentObject& obj,
|
|||
|
||||
void DocumentModel::slotRenameObject(const Gui::ViewProviderDocumentObject& obj)
|
||||
{
|
||||
Q_UNUSED(obj);
|
||||
// renaming of objects not supported at the moment
|
||||
}
|
||||
|
||||
void DocumentModel::slotActiveObject(const Gui::ViewProviderDocumentObject& obj)
|
||||
{
|
||||
Q_UNUSED(obj);
|
||||
// do nothing here because this is automatically done by calling
|
||||
// ViewProviderIndex::data()
|
||||
}
|
||||
|
@ -652,6 +661,7 @@ int DocumentModel::rowCount (const QModelIndex & parent) const
|
|||
|
||||
QVariant DocumentModel::headerData (int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
Q_UNUSED(section);
|
||||
if (orientation == Qt::Horizontal) {
|
||||
if (role != Qt::DisplayRole)
|
||||
return QVariant();
|
||||
|
|
|
@ -319,7 +319,7 @@ Py::Object DocumentPy::getActiveObject(void) const
|
|||
}
|
||||
}
|
||||
|
||||
void DocumentPy::setActiveObject(Py::Object arg)
|
||||
void DocumentPy::setActiveObject(Py::Object /*arg*/)
|
||||
{
|
||||
throw Py::AttributeError("'Document' object attribute 'ActiveObject' is read-only");
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ Py::Object DocumentPy::getActiveView(void) const
|
|||
}
|
||||
}
|
||||
|
||||
void DocumentPy::setActiveView(Py::Object arg)
|
||||
void DocumentPy::setActiveView(Py::Object /*arg*/)
|
||||
{
|
||||
throw Py::AttributeError("'Document' object attribute 'ActiveView' is read-only");
|
||||
}
|
||||
|
|
|
@ -135,6 +135,7 @@ QPlainTextEdit* EditorView::getEditor() const
|
|||
|
||||
void EditorView::OnChange(Base::Subject<const char*> &rCaller,const char* rcReason)
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
ParameterGrp::handle hPrefGrp = getWindowParameter();
|
||||
if (strcmp(rcReason, "EnableLineNumber") == 0) {
|
||||
//bool show = hPrefGrp->GetBool( "EnableLineNumber", true );
|
||||
|
@ -167,7 +168,7 @@ void EditorView::checkTimestamp()
|
|||
/**
|
||||
* Runs the action specified by \a pMsg.
|
||||
*/
|
||||
bool EditorView::onMsg(const char* pMsg,const char** ppReturn)
|
||||
bool EditorView::onMsg(const char* pMsg,const char** /*ppReturn*/)
|
||||
{
|
||||
if (strcmp(pMsg,"Save")==0){
|
||||
saveFile();
|
||||
|
@ -473,6 +474,7 @@ void EditorView::redoAvailable(bool redo)
|
|||
|
||||
void EditorView::contentsChange(int position, int charsRemoved, int charsAdded)
|
||||
{
|
||||
Q_UNUSED(position);
|
||||
if (d->lock)
|
||||
return;
|
||||
if (charsRemoved > 0 && charsAdded > 0)
|
||||
|
@ -502,7 +504,7 @@ QStringList EditorView::redoActions() const
|
|||
return d->redos;;
|
||||
}
|
||||
|
||||
void EditorView::focusInEvent (QFocusEvent * e)
|
||||
void EditorView::focusInEvent (QFocusEvent *)
|
||||
{
|
||||
d->textEdit->setFocus();
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@ QPixmap ExpressionBinding::getIcon(const char* name, const QSize& size) const
|
|||
|
||||
bool ExpressionBinding::apply(const std::string & propName)
|
||||
{
|
||||
Q_UNUSED(propName);
|
||||
if (hasExpression()) {
|
||||
DocumentObject * docObj = path.getDocumentObject();
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#ifndef _PreComp_
|
||||
# include <QApplication>
|
||||
# include <QButtonGroup>
|
||||
# include <QCompleter>
|
||||
# include <QCompleter>
|
||||
# include <QComboBox>
|
||||
# include <QDesktopServices>
|
||||
# include <QDir>
|
||||
|
@ -61,7 +61,7 @@ FileDialog::~FileDialog()
|
|||
{
|
||||
}
|
||||
|
||||
void FileDialog::onSelectedFilter(const QString& filter)
|
||||
void FileDialog::onSelectedFilter(const QString& /*filter*/)
|
||||
{
|
||||
QRegExp rx(QLatin1String("\\(\\*.(\\w+)"));
|
||||
QString suf = selectedNameFilter();
|
||||
|
@ -91,21 +91,21 @@ void FileDialog::accept()
|
|||
// When saving to a file make sure that the entered filename ends with the selected
|
||||
// file filter
|
||||
if (acceptMode() == QFileDialog::AcceptSave) {
|
||||
QStringList files = selectedFiles();
|
||||
if (!files.isEmpty()) {
|
||||
QString ext = this->defaultSuffix();
|
||||
QString file = files.front();
|
||||
QString suffix = QFileInfo(file).suffix();
|
||||
// #0001928: do not add a suffix if a file with suffix is entered
|
||||
// #0002209: make sure that the entered suffix is part of one of the filters
|
||||
if (!ext.isEmpty() && (suffix.isEmpty() || !hasSuffix(suffix))) {
|
||||
file = QString::fromLatin1("%1.%2").arg(file).arg(ext);
|
||||
// That's the built-in line edit
|
||||
QLineEdit* fileNameEdit = this->findChild<QLineEdit*>(QString::fromLatin1("fileNameEdit"));
|
||||
if (fileNameEdit)
|
||||
fileNameEdit->setText(file);
|
||||
}
|
||||
}
|
||||
QStringList files = selectedFiles();
|
||||
if (!files.isEmpty()) {
|
||||
QString ext = this->defaultSuffix();
|
||||
QString file = files.front();
|
||||
QString suffix = QFileInfo(file).suffix();
|
||||
// #0001928: do not add a suffix if a file with suffix is entered
|
||||
// #0002209: make sure that the entered suffix is part of one of the filters
|
||||
if (!ext.isEmpty() && (suffix.isEmpty() || !hasSuffix(suffix))) {
|
||||
file = QString::fromLatin1("%1.%2").arg(file).arg(ext);
|
||||
// That's the built-in line edit
|
||||
QLineEdit* fileNameEdit = this->findChild<QLineEdit*>(QString::fromLatin1("fileNameEdit"));
|
||||
if (fileNameEdit)
|
||||
fileNameEdit->setText(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
QFileDialog::accept();
|
||||
}
|
||||
|
@ -435,10 +435,10 @@ void FileOptionsDialog::accept()
|
|||
else if (ext.toLower() != suf.toLower()) {
|
||||
fn = QString::fromLatin1("%1.%2").arg(fn).arg(suf);
|
||||
selectFile(fn);
|
||||
// That's the built-in line edit (fixes Debian bug #811200)
|
||||
QLineEdit* fileNameEdit = this->findChild<QLineEdit*>(QString::fromLatin1("fileNameEdit"));
|
||||
if (fileNameEdit)
|
||||
fileNameEdit->setText(fn);
|
||||
// That's the built-in line edit (fixes Debian bug #811200)
|
||||
QLineEdit* fileNameEdit = this->findChild<QLineEdit*>(QString::fromLatin1("fileNameEdit"));
|
||||
if (fileNameEdit)
|
||||
fileNameEdit->setText(fn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -527,19 +527,19 @@ FileChooser::FileChooser ( QWidget * parent )
|
|||
layout->setMargin( 0 );
|
||||
layout->setSpacing( 6 );
|
||||
|
||||
lineEdit = new QLineEdit ( this );
|
||||
completer = new QCompleter ( this );
|
||||
completer->setMaxVisibleItems( 12 );
|
||||
fs_model = new QFileSystemModel( completer );
|
||||
fs_model->setRootPath(QString::fromUtf8(""));
|
||||
completer->setModel( fs_model );
|
||||
lineEdit->setCompleter( completer );
|
||||
|
||||
lineEdit = new QLineEdit ( this );
|
||||
completer = new QCompleter ( this );
|
||||
completer->setMaxVisibleItems( 12 );
|
||||
fs_model = new QFileSystemModel( completer );
|
||||
fs_model->setRootPath(QString::fromUtf8(""));
|
||||
completer->setModel( fs_model );
|
||||
lineEdit->setCompleter( completer );
|
||||
|
||||
layout->addWidget( lineEdit );
|
||||
|
||||
connect(lineEdit, SIGNAL(textChanged(const QString &)),
|
||||
this, SIGNAL(fileNameChanged(const QString &)));
|
||||
|
||||
|
||||
connect(lineEdit, SIGNAL(editingFinished()), this, SLOT(editingFinished()));
|
||||
|
||||
button = new QPushButton(QLatin1String("..."), this);
|
||||
|
@ -569,13 +569,13 @@ QString FileChooser::fileName() const
|
|||
}
|
||||
|
||||
void FileChooser::editingFinished()
|
||||
{
|
||||
QString le_converted = QDir::fromNativeSeparators(lineEdit->text());
|
||||
lineEdit->setText(le_converted);
|
||||
{
|
||||
QString le_converted = QDir::fromNativeSeparators(lineEdit->text());
|
||||
lineEdit->setText(le_converted);
|
||||
FileDialog::setWorkingDirectory(le_converted);
|
||||
fileNameSelected(le_converted);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the file name \a s.
|
||||
*/
|
||||
|
|
|
@ -159,6 +159,8 @@ void Flag::paintGL()
|
|||
|
||||
void Flag::resizeGL(int width, int height)
|
||||
{
|
||||
Q_UNUSED(width);
|
||||
Q_UNUSED(height);
|
||||
return;
|
||||
//int side = qMin(width, height);
|
||||
//glViewport((width - side) / 2, (height - side) / 2, side, side);
|
||||
|
@ -224,7 +226,7 @@ void Flag::setText(const QString& t)
|
|||
this->text = t;
|
||||
}
|
||||
|
||||
void Flag::resizeEvent(QResizeEvent * e)
|
||||
void Flag::resizeEvent(QResizeEvent * )
|
||||
{
|
||||
#if 0
|
||||
image = QImage(this->size(), QImage::Format_ARGB32);
|
||||
|
|
|
@ -284,7 +284,7 @@ QByteArray GraphvizView::exportGraph(const QString& format)
|
|||
return proc.readAll();
|
||||
}
|
||||
|
||||
bool GraphvizView::onMsg(const char* pMsg,const char** ppReturn)
|
||||
bool GraphvizView::onMsg(const char* pMsg,const char**)
|
||||
{
|
||||
if (strcmp("Save",pMsg) == 0 || strcmp("SaveAs",pMsg) == 0) {
|
||||
QList< QPair<QString, QString> > formatMap;
|
||||
|
|
|
@ -502,6 +502,7 @@ bool Gui::GUIApplicationNativeEventAware::x11EventFilter(XEvent *event)
|
|||
Base::Console().Log("Unknown spaceball event\n");
|
||||
return true;
|
||||
#else
|
||||
Q_UNUSED(event);
|
||||
return false;
|
||||
#endif // SPNAV_FOUND
|
||||
}
|
||||
|
|
|
@ -621,6 +621,7 @@ void InputField::fixup(QString& input) const
|
|||
|
||||
QValidator::State InputField::validate(QString& input, int& pos) const
|
||||
{
|
||||
Q_UNUSED(pos);
|
||||
try {
|
||||
Quantity res;
|
||||
QString text = input;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <Inventor/elements/SoViewportRegionElement.h>
|
||||
|
||||
#include "SoDrawingGrid.h"
|
||||
#include <QObject>
|
||||
|
||||
using namespace Gui::Inventor;
|
||||
|
||||
|
@ -174,10 +175,14 @@ SoDrawingGrid::GLRenderOffPath(SoGLRenderAction *)
|
|||
void
|
||||
SoDrawingGrid::generatePrimitives(SoAction* action)
|
||||
{
|
||||
Q_UNUSED(action);
|
||||
}
|
||||
|
||||
void
|
||||
SoDrawingGrid::computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er)
|
||||
{
|
||||
Q_UNUSED(action);
|
||||
Q_UNUSED(box);
|
||||
Q_UNUSED(center);
|
||||
//SoState* state = action->getState();
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ void MDIView::deleteSelf()
|
|||
|
||||
void MDIView::setOverrideCursor(const QCursor& c)
|
||||
{
|
||||
Q_UNUSED(c);
|
||||
}
|
||||
|
||||
void MDIView::restoreOverrideCursor()
|
||||
|
@ -144,11 +145,14 @@ void MDIView::viewAll()
|
|||
/// receive a message
|
||||
bool MDIView::onMsg(const char* pMsg,const char** ppReturn)
|
||||
{
|
||||
Q_UNUSED(pMsg);
|
||||
Q_UNUSED(ppReturn);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MDIView::onHasMsg(const char* pMsg) const
|
||||
{
|
||||
Q_UNUSED(pMsg);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -193,6 +197,7 @@ void MDIView::windowStateChanged( MDIView* )
|
|||
|
||||
void MDIView::print(QPrinter* printer)
|
||||
{
|
||||
Q_UNUSED(printer);
|
||||
std::cerr << "Printing not implemented for " << this->metaObject()->className() << std::endl;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,13 +70,15 @@ MacroManager::~MacroManager()
|
|||
|
||||
void MacroManager::OnChange(Base::Subject<const char*> &rCaller, const char * sReason)
|
||||
{
|
||||
(void)rCaller;
|
||||
(void)sReason;
|
||||
this->recordGui = this->params->GetBool("RecordGui", true);
|
||||
this->guiAsComment = this->params->GetBool("GuiAsComment", true);
|
||||
this->scriptToPyConsole = this->params->GetBool("ScriptToPyConsole", true);
|
||||
this->localEnv = this->params->GetBool("LocalEnvironment", true);
|
||||
}
|
||||
|
||||
void MacroManager::open(MacroType eType,const char *sName)
|
||||
void MacroManager::open(MacroType eType, const char *sName)
|
||||
{
|
||||
// check
|
||||
assert(!this->openMacro);
|
||||
|
@ -227,8 +229,10 @@ namespace Gui {
|
|||
};
|
||||
}
|
||||
|
||||
void MacroManager::run(MacroType eType,const char *sName)
|
||||
void MacroManager::run(MacroType eType, const char *sName)
|
||||
{
|
||||
Q_UNUSED(eType);
|
||||
|
||||
try {
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("OutputWindow");
|
||||
|
|
|
@ -782,6 +782,7 @@ void MainWindow::removeWindow(Gui::MDIView* view)
|
|||
|
||||
void MainWindow::tabChanged(MDIView* view)
|
||||
{
|
||||
Q_UNUSED(view);
|
||||
}
|
||||
|
||||
void MainWindow::tabCloseRequested(int index)
|
||||
|
|
|
@ -488,6 +488,8 @@ public:
|
|||
void copyCameraSettings(SoCamera* cam1, SbRotation& rot_cam1, SbVec3f& pos_cam1,
|
||||
SoCamera* cam2, SbRotation& rot_cam2, SbVec3f& pos_cam2)
|
||||
{
|
||||
Q_UNUSED(pos_cam2);
|
||||
|
||||
// recompute the diff we have applied to the camera's orientation
|
||||
SbRotation rot = cam1->orientation.getValue();
|
||||
SbRotation dif = rot * rot_cam1.inverse();
|
||||
|
@ -1167,6 +1169,8 @@ void ManualAlignment::onCancel()
|
|||
|
||||
void ManualAlignment::probePickedCallback(void * ud, SoEventCallback * n)
|
||||
{
|
||||
Q_UNUSED(ud);
|
||||
|
||||
Gui::View3DInventorViewer* view = reinterpret_cast<Gui::View3DInventorViewer*>(n->getUserData());
|
||||
const SoEvent* ev = n->getEvent();
|
||||
if (ev->getTypeId() == SoMouseButtonEvent::getClassTypeId()) {
|
||||
|
|
|
@ -383,7 +383,7 @@ int PolyPickerSelection::mouseButtonEvent(const SoMouseButtonEvent* const e, con
|
|||
return Continue;
|
||||
}
|
||||
|
||||
int PolyPickerSelection::locationEvent(const SoLocation2Event* const e, const QPoint& pos)
|
||||
int PolyPickerSelection::locationEvent(const SoLocation2Event* const, const QPoint& pos)
|
||||
{
|
||||
// do all the drawing stuff for us
|
||||
QPoint clPoint = pos;
|
||||
|
@ -425,7 +425,7 @@ int PolyPickerSelection::locationEvent(const SoLocation2Event* const e, const QP
|
|||
return Continue;
|
||||
}
|
||||
|
||||
int PolyPickerSelection::keyboardEvent(const SoKeyboardEvent* const e)
|
||||
int PolyPickerSelection::keyboardEvent(const SoKeyboardEvent* const)
|
||||
{
|
||||
return Continue;
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ int RubberbandSelection::mouseButtonEvent(const SoMouseButtonEvent* const e, con
|
|||
return ret;
|
||||
}
|
||||
|
||||
int RubberbandSelection::locationEvent(const SoLocation2Event* const e, const QPoint& pos)
|
||||
int RubberbandSelection::locationEvent(const SoLocation2Event* const, const QPoint& pos)
|
||||
{
|
||||
m_iXnew = pos.x();
|
||||
m_iYnew = pos.y();
|
||||
|
@ -712,7 +712,7 @@ int RubberbandSelection::locationEvent(const SoLocation2Event* const e, const QP
|
|||
return Continue;
|
||||
}
|
||||
|
||||
int RubberbandSelection::keyboardEvent(const SoKeyboardEvent* const e)
|
||||
int RubberbandSelection::keyboardEvent(const SoKeyboardEvent* const)
|
||||
{
|
||||
return Continue;
|
||||
}
|
||||
|
|
|
@ -80,13 +80,13 @@ public:
|
|||
//@}
|
||||
|
||||
protected:
|
||||
virtual int mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos) {
|
||||
virtual int mouseButtonEvent(const SoMouseButtonEvent* const, const QPoint&) {
|
||||
return 0;
|
||||
};
|
||||
virtual int locationEvent(const SoLocation2Event* const e, const QPoint& pos) {
|
||||
virtual int locationEvent(const SoLocation2Event* const, const QPoint&) {
|
||||
return 0;
|
||||
};
|
||||
virtual int keyboardEvent(const SoKeyboardEvent* const e) {
|
||||
virtual int keyboardEvent(const SoKeyboardEvent* const) {
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -455,6 +455,7 @@ void NavigationStyle::setCameraOrientation(const SbRotation& rot, SbBool moveToC
|
|||
|
||||
void NavigationStyleP::viewAnimationCB(void * data, SoSensor * sensor)
|
||||
{
|
||||
Q_UNUSED(sensor);
|
||||
NavigationStyle* that = reinterpret_cast<NavigationStyle*>(data);
|
||||
if (PRIVATE(that)->animationsteps > 0) {
|
||||
// here the camera rotates from the current rotation to a given
|
||||
|
@ -1494,6 +1495,7 @@ SbBool NavigationStyle::isPopupMenuEnabled(void) const
|
|||
|
||||
void NavigationStyle::openPopupMenu(const SbVec2s& position)
|
||||
{
|
||||
Q_UNUSED(position);
|
||||
// ask workbenches and view provider, ...
|
||||
MenuItem* view = new MenuItem;
|
||||
Gui::Application::Instance->setupContextMenu("View", view);
|
||||
|
|
|
@ -356,6 +356,8 @@ void NetworkRetriever::abort()
|
|||
|
||||
void NetworkRetriever::wgetFinished(int exitCode, QProcess::ExitStatus status)
|
||||
{
|
||||
Q_UNUSED(exitCode);
|
||||
Q_UNUSED(status);
|
||||
wget->setReadChannel(QProcess::StandardError);
|
||||
if (wget->canReadLine()) {
|
||||
QByteArray data = wget->readAll();
|
||||
|
@ -455,6 +457,7 @@ void StdCmdDownloadOnlineHelp::languageChange()
|
|||
|
||||
void StdCmdDownloadOnlineHelp::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
if (!wget->isDownloading()) {
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp");
|
||||
hGrp = hGrp->GetGroup("Preferences")->GetGroup("OnlineHelp");
|
||||
|
|
|
@ -424,6 +424,7 @@ StdCmdPythonHelp::~StdCmdPythonHelp()
|
|||
|
||||
void StdCmdPythonHelp::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// try to open a connection over this port
|
||||
qint16 port = 7465;
|
||||
if (!this->server)
|
||||
|
|
|
@ -102,6 +102,7 @@ QByteArray PrefWidget::paramGrpPath() const
|
|||
*/
|
||||
void PrefWidget::OnChange(Base::Subject<const char*> &rCaller, const char * sReason)
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
if (std::strcmp(sReason,m_sPrefName) == 0)
|
||||
restorePreferences();
|
||||
}
|
||||
|
|
|
@ -440,6 +440,7 @@ PythonConsole::~PythonConsole()
|
|||
/** Set new font and colors according to the paramerts. */
|
||||
void PythonConsole::OnChange( Base::Subject<const char*> &rCaller,const char* sReason )
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
ParameterGrp::handle hPrefGrp = getWindowParameter();
|
||||
|
||||
if (strcmp(sReason, "FontSize") == 0 || strcmp(sReason, "Font") == 0) {
|
||||
|
@ -1312,6 +1313,8 @@ void PythonConsoleHighlighter::highlightBlock(const QString& text)
|
|||
|
||||
void PythonConsoleHighlighter::colorChanged(const QString& type, const QColor& col)
|
||||
{
|
||||
Q_UNUSED(type);
|
||||
Q_UNUSED(col);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
|
|
@ -342,7 +342,7 @@ Py::Object PythonStdin::repr()
|
|||
return Py::String(s_out.str());
|
||||
}
|
||||
|
||||
Py::Object PythonStdin::readline(const Py::Tuple& args)
|
||||
Py::Object PythonStdin::readline(const Py::Tuple& /*args*/)
|
||||
{
|
||||
return Py::String( (const char *)pyConsole->readline().toLatin1() );
|
||||
}
|
||||
|
|
|
@ -133,22 +133,22 @@ PythonDebugModule::~PythonDebugModule()
|
|||
{
|
||||
}
|
||||
|
||||
Py::Object PythonDebugModule::getFunctionCallCount(const Py::Tuple &a)
|
||||
Py::Object PythonDebugModule::getFunctionCallCount(const Py::Tuple &)
|
||||
{
|
||||
return Py::None();
|
||||
}
|
||||
|
||||
Py::Object PythonDebugModule::getExceptionCount(const Py::Tuple &a)
|
||||
Py::Object PythonDebugModule::getExceptionCount(const Py::Tuple &)
|
||||
{
|
||||
return Py::None();
|
||||
}
|
||||
|
||||
Py::Object PythonDebugModule::getLineCount(const Py::Tuple &a)
|
||||
Py::Object PythonDebugModule::getLineCount(const Py::Tuple &)
|
||||
{
|
||||
return Py::None();
|
||||
}
|
||||
|
||||
Py::Object PythonDebugModule::getFunctionReturnCount(const Py::Tuple &a)
|
||||
Py::Object PythonDebugModule::getFunctionReturnCount(const Py::Tuple &)
|
||||
{
|
||||
return Py::None();
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ void PythonDebugger::hideDebugMarker(const QString& fn)
|
|||
// http://code.google.com/p/idapython/source/browse/trunk/python.cpp
|
||||
// http://www.koders.com/cpp/fid191F7B13CF73133935A7A2E18B7BF43ACC6D1784.aspx?s=PyEval_SetTrace
|
||||
// http://stuff.mit.edu/afs/sipb/project/python/src/python2.2-2.2.2/Modules/_hotshot.c
|
||||
int PythonDebugger::tracer_callback(PyObject *obj, PyFrameObject *frame, int what, PyObject *arg)
|
||||
int PythonDebugger::tracer_callback(PyObject *obj, PyFrameObject *frame, int what, PyObject * /*arg*/)
|
||||
{
|
||||
PythonDebuggerPy* self = static_cast<PythonDebuggerPy*>(obj);
|
||||
PythonDebugger* dbg = self->dbg;
|
||||
|
|
|
@ -119,6 +119,9 @@ PyObject* PythonWorkbenchPy::removeMenu(PyObject *args)
|
|||
PyObject* PythonWorkbenchPy::listMenus(PyObject *args)
|
||||
{
|
||||
PY_TRY {
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return NULL;
|
||||
|
||||
std::list<std::string> menus = getPythonBaseWorkbenchPtr()->listMenus();
|
||||
|
||||
PyObject* pyList = PyList_New(menus.size());
|
||||
|
@ -245,6 +248,9 @@ PyObject* PythonWorkbenchPy::removeToolbar(PyObject *args)
|
|||
PyObject* PythonWorkbenchPy::listToolbars(PyObject *args)
|
||||
{
|
||||
PY_TRY {
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return NULL;
|
||||
|
||||
std::list<std::string> bars = getPythonBaseWorkbenchPtr()->listToolbars();
|
||||
|
||||
PyObject* pyList = PyList_New(bars.size());
|
||||
|
@ -303,6 +309,9 @@ PyObject* PythonWorkbenchPy::removeCommandbar(PyObject *args)
|
|||
PyObject* PythonWorkbenchPy::listCommandbars(PyObject *args)
|
||||
{
|
||||
PY_TRY {
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return NULL;
|
||||
|
||||
std::list<std::string> bars = getPythonBaseWorkbenchPtr()->listCommandbars();
|
||||
|
||||
PyObject* pyList = PyList_New(bars.size());
|
||||
|
@ -315,12 +324,12 @@ PyObject* PythonWorkbenchPy::listCommandbars(PyObject *args)
|
|||
} PY_CATCH;
|
||||
}
|
||||
|
||||
PyObject *PythonWorkbenchPy::getCustomAttributes(const char* attr) const
|
||||
PyObject *PythonWorkbenchPy::getCustomAttributes(const char* ) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int PythonWorkbenchPy::setCustomAttributes(const char* attr, PyObject *obj)
|
||||
int PythonWorkbenchPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -187,6 +187,7 @@ void ActionGroup::processShow()
|
|||
|
||||
void ActionGroup::paintEvent ( QPaintEvent * event )
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
QPainter p(this);
|
||||
|
||||
if (myDummy->isVisible()) {
|
||||
|
|
|
@ -72,6 +72,7 @@ void ActionPanel::removeWidget(QWidget *w)
|
|||
|
||||
void ActionPanel::addStretch(int s)
|
||||
{
|
||||
Q_UNUSED(s);
|
||||
//((QVBoxLayout*)layout())->addStretch(s);
|
||||
if (!mySpacer) {
|
||||
mySpacer = new QSpacerItem(0,0,QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
|
|
|
@ -141,6 +141,7 @@ EventFilter::unregisterInputDevice(InputDevice * device)
|
|||
bool
|
||||
EventFilter::eventFilter(QObject * obj, QEvent * qevent)
|
||||
{
|
||||
Q_UNUSED(obj);
|
||||
// make sure every device has updated screen size and mouse position
|
||||
// before translating events
|
||||
switch (qevent->type()) {
|
||||
|
|
|
@ -122,6 +122,7 @@ InteractionMode::keyReleaseEvent(QKeyEvent * event)
|
|||
bool
|
||||
InteractionMode::focusOutEvent(QFocusEvent * event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
if (this->altkeydown) {
|
||||
QKeyEvent keyevent(QEvent::KeyRelease, Qt::Key_Alt, Qt::NoModifier);
|
||||
return QCoreApplication::sendEvent(this->quarterwidget, &keyevent);
|
||||
|
|
|
@ -145,6 +145,7 @@ public:
|
|||
QuarterWidget::QuarterWidget(const QGLFormat & format, QWidget * parent, const QGLWidget * sharewidget, Qt::WindowFlags f)
|
||||
: inherited(parent)
|
||||
{
|
||||
Q_UNUSED(f);
|
||||
this->constructor(format, sharewidget);
|
||||
}
|
||||
|
||||
|
@ -152,6 +153,7 @@ QuarterWidget::QuarterWidget(const QGLFormat & format, QWidget * parent, const Q
|
|||
QuarterWidget::QuarterWidget(QWidget * parent, const QGLWidget * sharewidget, Qt::WindowFlags f)
|
||||
: inherited(parent)
|
||||
{
|
||||
Q_UNUSED(f);
|
||||
this->constructor(QGLFormat(), sharewidget);
|
||||
}
|
||||
|
||||
|
@ -159,6 +161,7 @@ QuarterWidget::QuarterWidget(QWidget * parent, const QGLWidget * sharewidget, Qt
|
|||
QuarterWidget::QuarterWidget(QGLContext * context, QWidget * parent, const QGLWidget * sharewidget, Qt::WindowFlags f)
|
||||
: inherited(parent)
|
||||
{
|
||||
Q_UNUSED(f);
|
||||
this->constructor(context->format(), sharewidget);
|
||||
}
|
||||
|
||||
|
|
|
@ -194,6 +194,7 @@ QuarterWidgetP::rendercb(void * userdata, SoRenderManager *)
|
|||
void
|
||||
QuarterWidgetP::prerendercb(void * userdata, SoRenderManager * manager)
|
||||
{
|
||||
Q_UNUSED(manager);
|
||||
QuarterWidgetP * thisp = static_cast<QuarterWidgetP *>(userdata);
|
||||
SoEventManager * evman = thisp->soeventmanager;
|
||||
assert(evman);
|
||||
|
@ -206,6 +207,7 @@ QuarterWidgetP::prerendercb(void * userdata, SoRenderManager * manager)
|
|||
void
|
||||
QuarterWidgetP::postrendercb(void * userdata, SoRenderManager * manager)
|
||||
{
|
||||
Q_UNUSED(manager);
|
||||
QuarterWidgetP * thisp = static_cast<QuarterWidgetP *>(userdata);
|
||||
SoEventManager * evman = thisp->soeventmanager;
|
||||
assert(evman);
|
||||
|
@ -218,6 +220,7 @@ QuarterWidgetP::postrendercb(void * userdata, SoRenderManager * manager)
|
|||
void
|
||||
QuarterWidgetP::statechangecb(void * userdata, ScXMLStateMachine * statemachine, const char * stateid, SbBool enter, SbBool)
|
||||
{
|
||||
Q_UNUSED(statemachine);
|
||||
static const SbName contextmenurequest("contextmenurequest");
|
||||
QuarterWidgetP * thisp = static_cast<QuarterWidgetP *>(userdata);
|
||||
assert(thisp && thisp->master);
|
||||
|
@ -325,6 +328,9 @@ QuarterWidgetP::nativeEventFilter(void * message, long * result)
|
|||
qApp->postEvent(QApplication::focusWidget(), ne);
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(message);
|
||||
Q_UNUSED(result);
|
||||
#endif // HAVE_SPACENAV_LIB
|
||||
|
||||
return false;
|
||||
|
|
|
@ -111,6 +111,7 @@ SpaceNavigatorDevice::~SpaceNavigatorDevice()
|
|||
const SoEvent *
|
||||
SpaceNavigatorDevice::translateEvent(QEvent * event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
SoEvent * ret = NULL;
|
||||
|
||||
#ifdef HAVE_SPACENAV_LIB
|
||||
|
|
|
@ -48,6 +48,7 @@ SceneModel::~SceneModel()
|
|||
|
||||
int SceneModel::columnCount (const QModelIndex & parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ SelectionFilterGate::~SelectionFilterGate()
|
|||
delete Filter;
|
||||
}
|
||||
|
||||
bool SelectionFilterGate::allow(App::Document*pDoc,App::DocumentObject*pObj, const char*sSubName)
|
||||
bool SelectionFilterGate::allow(App::Document* /*pDoc*/, App::DocumentObject*pObj, const char*sSubName)
|
||||
{
|
||||
return Filter->test(pObj,sSubName);
|
||||
}
|
||||
|
@ -276,6 +276,8 @@ Py::Object SelectionFilterPy::repr()
|
|||
|
||||
Py::Object SelectionFilterPy::match(const Py::Tuple& args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args.ptr(), ""))
|
||||
throw Py::Exception();
|
||||
return Py::Boolean(filter.match());
|
||||
}
|
||||
|
||||
|
|
|
@ -96,6 +96,7 @@ SelectionView::~SelectionView()
|
|||
void SelectionView::OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
|
||||
Gui::SelectionSingleton::MessageType Reason)
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
QString selObject;
|
||||
QTextStream str(&selObject);
|
||||
if (Reason.Type == SelectionChanges::AddSelection) {
|
||||
|
@ -289,7 +290,7 @@ void SelectionView::onUpdate(void)
|
|||
{
|
||||
}
|
||||
|
||||
bool SelectionView::onMsg(const char* pMsg,const char** ppReturn)
|
||||
bool SelectionView::onMsg(const char* /*pMsg*/,const char** /*ppReturn*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ SoAxisCrossKit::affectsState() const
|
|||
return false;
|
||||
}
|
||||
|
||||
void SoAxisCrossKit::addWriteReference(SoOutput * out, SbBool isfromfield)
|
||||
void SoAxisCrossKit::addWriteReference(SoOutput * /*out*/, SbBool /*isfromfield*/)
|
||||
{
|
||||
// this node should not be written out to a file
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ void SoRegPoint::GLRender(SoGLRenderAction *action)
|
|||
}
|
||||
}
|
||||
|
||||
void SoRegPoint::generatePrimitives(SoAction* action)
|
||||
void SoRegPoint::generatePrimitives(SoAction* /*action*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ void SoFCBackgroundGradient::initClass(void)
|
|||
SO_NODE_INIT_CLASS(SoFCBackgroundGradient,SoNode,"Node");
|
||||
}
|
||||
|
||||
void SoFCBackgroundGradient::GLRender (SoGLRenderAction *action)
|
||||
void SoFCBackgroundGradient::GLRender (SoGLRenderAction * /*action*/)
|
||||
{
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
|
|
|
@ -218,11 +218,11 @@ void SoFCBoundingBox::GLRender (SoGLRenderAction *action)
|
|||
state->pop();
|
||||
}
|
||||
|
||||
void SoFCBoundingBox::generatePrimitives (SoAction *action)
|
||||
void SoFCBoundingBox::generatePrimitives (SoAction */*action*/)
|
||||
{
|
||||
}
|
||||
|
||||
void SoFCBoundingBox::computeBBox (SoAction *action, SbBox3f &box, SbVec3f ¢er)
|
||||
void SoFCBoundingBox::computeBBox (SoAction */*action*/, SbBox3f &box, SbVec3f ¢er)
|
||||
{
|
||||
center = (minBounds.getValue() + maxBounds.getValue()) / 2.0f;
|
||||
box.setBounds(minBounds.getValue(), maxBounds.getValue());
|
||||
|
|
|
@ -206,7 +206,7 @@ App::Color SoFCColorBar::getColor( float fVal ) const
|
|||
return this->getActiveBar()->getColor( fVal );
|
||||
}
|
||||
|
||||
void SoFCColorBar::eventCallback(void * userdata, SoEventCallback * node)
|
||||
void SoFCColorBar::eventCallback(void * /*userdata*/, SoEventCallback * node)
|
||||
{
|
||||
const SoEvent * event = node->getEvent();
|
||||
if (event->getTypeId().isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) {
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
unsigned short getColorIndex (float fVal) const { return _cColRamp.getColorIndex(fVal); }
|
||||
App::Color getColor (float fVal) const { return _cColRamp.getColor(fVal); }
|
||||
void setOutsideGrayed (bool bVal) { _cColRamp.setOutsideGrayed(bVal); }
|
||||
bool isVisible (float fVal) const { return false; }
|
||||
bool isVisible (float) const { return false; }
|
||||
float getMinValue (void) const { return _cColRamp.getMinValue(); }
|
||||
float getMaxValue (void) const { return _cColRamp.getMaxValue(); }
|
||||
unsigned long countColors (void) const { return _cColRamp.getCountColors(); }
|
||||
|
|
|
@ -35,7 +35,7 @@ void SoFCInteractiveElement::initClass(void)
|
|||
SO_ENABLE(SoGLRenderAction, SoFCInteractiveElement);
|
||||
}
|
||||
|
||||
void SoFCInteractiveElement::init(SoState * state)
|
||||
void SoFCInteractiveElement::init(SoState * /*state*/)
|
||||
{
|
||||
this->interactiveMode = false;
|
||||
}
|
||||
|
@ -100,26 +100,26 @@ void SoGLWidgetElement::get(SoState * state, QGLWidget *& window)
|
|||
(SoElement::getConstElement(state, classStackIndex));
|
||||
window = that->window;
|
||||
}
|
||||
|
||||
void SoGLWidgetElement::push(SoState * state)
|
||||
{
|
||||
inherited::push(state);
|
||||
}
|
||||
|
||||
void SoGLWidgetElement::pop(SoState * state, const SoElement * prevTopElement)
|
||||
{
|
||||
inherited::pop(state, prevTopElement);
|
||||
}
|
||||
|
||||
SbBool SoGLWidgetElement::matches(const SoElement * element) const
|
||||
{
|
||||
|
||||
void SoGLWidgetElement::push(SoState * state)
|
||||
{
|
||||
inherited::push(state);
|
||||
}
|
||||
|
||||
void SoGLWidgetElement::pop(SoState * state, const SoElement * prevTopElement)
|
||||
{
|
||||
inherited::pop(state, prevTopElement);
|
||||
}
|
||||
|
||||
SbBool SoGLWidgetElement::matches(const SoElement * /*element*/) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
SoElement * SoGLWidgetElement::copyMatchInfo(void) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
SoElement * SoGLWidgetElement::copyMatchInfo(void) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ---------------------------------
|
||||
|
||||
|
@ -155,62 +155,62 @@ void SoGLRenderActionElement::get(SoState * state, SoGLRenderAction * & action)
|
|||
(SoElement::getConstElement(state, classStackIndex));
|
||||
action = that->glRenderAction;
|
||||
}
|
||||
|
||||
void SoGLRenderActionElement::push(SoState * state)
|
||||
{
|
||||
inherited::push(state);
|
||||
}
|
||||
|
||||
void SoGLRenderActionElement::pop(SoState * state, const SoElement * prevTopElement)
|
||||
{
|
||||
inherited::pop(state, prevTopElement);
|
||||
}
|
||||
|
||||
SbBool SoGLRenderActionElement::matches(const SoElement * element) const
|
||||
{
|
||||
|
||||
void SoGLRenderActionElement::push(SoState * state)
|
||||
{
|
||||
inherited::push(state);
|
||||
}
|
||||
|
||||
void SoGLRenderActionElement::pop(SoState * state, const SoElement * prevTopElement)
|
||||
{
|
||||
inherited::pop(state, prevTopElement);
|
||||
}
|
||||
|
||||
SbBool SoGLRenderActionElement::matches(const SoElement * /*element*/) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
SoElement * SoGLRenderActionElement::copyMatchInfo(void) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
SoElement * SoGLRenderActionElement::copyMatchInfo(void) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ---------------------------------
|
||||
|
||||
SO_NODE_SOURCE(SoGLWidgetNode);
|
||||
|
||||
/*!
|
||||
Constructor.
|
||||
*/
|
||||
SoGLWidgetNode::SoGLWidgetNode(void) : window(0)
|
||||
{
|
||||
SO_NODE_CONSTRUCTOR(SoGLWidgetNode);
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
SoGLWidgetNode::~SoGLWidgetNode()
|
||||
{
|
||||
}
|
||||
|
||||
// Doc from superclass.
|
||||
void SoGLWidgetNode::initClass(void)
|
||||
{
|
||||
SO_NODE_INIT_CLASS(SoGLWidgetNode, SoNode, "Node");
|
||||
|
||||
SO_ENABLE(SoGLRenderAction, SoGLWidgetElement);
|
||||
}
|
||||
|
||||
// Doc from superclass.
|
||||
void SoGLWidgetNode::doAction(SoAction * action)
|
||||
{
|
||||
SoGLWidgetElement::set(action->getState(), this->window);
|
||||
}
|
||||
|
||||
// Doc from superclass.
|
||||
void SoGLWidgetNode::GLRender(SoGLRenderAction * action)
|
||||
{
|
||||
SoGLWidgetNode::doAction(action);
|
||||
}
|
||||
|
||||
SO_NODE_SOURCE(SoGLWidgetNode);
|
||||
|
||||
/*!
|
||||
Constructor.
|
||||
*/
|
||||
SoGLWidgetNode::SoGLWidgetNode(void) : window(0)
|
||||
{
|
||||
SO_NODE_CONSTRUCTOR(SoGLWidgetNode);
|
||||
}
|
||||
|
||||
/*!
|
||||
Destructor.
|
||||
*/
|
||||
SoGLWidgetNode::~SoGLWidgetNode()
|
||||
{
|
||||
}
|
||||
|
||||
// Doc from superclass.
|
||||
void SoGLWidgetNode::initClass(void)
|
||||
{
|
||||
SO_NODE_INIT_CLASS(SoGLWidgetNode, SoNode, "Node");
|
||||
|
||||
SO_ENABLE(SoGLRenderAction, SoGLWidgetElement);
|
||||
}
|
||||
|
||||
// Doc from superclass.
|
||||
void SoGLWidgetNode::doAction(SoAction * action)
|
||||
{
|
||||
SoGLWidgetElement::set(action->getState(), this->window);
|
||||
}
|
||||
|
||||
// Doc from superclass.
|
||||
void SoGLWidgetNode::GLRender(SoGLRenderAction * action)
|
||||
{
|
||||
SoGLWidgetNode::doAction(action);
|
||||
}
|
||||
|
|
|
@ -532,7 +532,7 @@ SoQtOffscreenRenderer::getPbufferEnable(void) const
|
|||
// *************************************************************************
|
||||
|
||||
void
|
||||
SoQtOffscreenRenderer::pre_render_cb(void * userdata, SoGLRenderAction * action)
|
||||
SoQtOffscreenRenderer::pre_render_cb(void * /*userdata*/, SoGLRenderAction * action)
|
||||
{
|
||||
glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);
|
||||
action->setRenderingIsRemote(false);
|
||||
|
|
|
@ -748,6 +748,8 @@ SoFCSelection::preRender(SoGLRenderAction *action, GLint &oldDepthFunc)
|
|||
void
|
||||
SoFCSelection::redrawHighlighted(SoAction * action , SbBool doHighlight )
|
||||
{
|
||||
Q_UNUSED(action);
|
||||
Q_UNUSED(doHighlight);
|
||||
//Base::Console().Log("SoFCSelection::redrawHighlighted() (%p) doHigh=%d \n",this,doHighlight?1:0);
|
||||
|
||||
#ifdef NO_FRONTBUFFER
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <Inventor/SbBasic.h>
|
||||
#include <Inventor/SbBSPTree.h>
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <Base/FileInfo.h>
|
||||
#include "SoFCVectorizeSVGAction.h"
|
||||
|
||||
|
@ -306,11 +307,17 @@ void SoFCVectorizeSVGActionP::printTriangle(const SbVec3f * v, const SbColor * c
|
|||
void SoFCVectorizeSVGActionP::printCircle(const SbVec3f & v, const SbColor & c, const float radius) const
|
||||
{
|
||||
// todo
|
||||
Q_UNUSED(v);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(radius);
|
||||
}
|
||||
|
||||
void SoFCVectorizeSVGActionP::printSquare(const SbVec3f & v, const SbColor & c, const float size) const
|
||||
{
|
||||
// todo
|
||||
Q_UNUSED(v);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(size);
|
||||
}
|
||||
|
||||
void SoFCVectorizeSVGActionP::printLine(const SoVectorizeLine * item) const
|
||||
|
@ -344,11 +351,13 @@ void SoFCVectorizeSVGActionP::printLine(const SoVectorizeLine * item) const
|
|||
void SoFCVectorizeSVGActionP::printPoint(const SoVectorizePoint * item) const
|
||||
{
|
||||
// todo
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
void SoFCVectorizeSVGActionP::printImage(const SoVectorizeImage * item) const
|
||||
{
|
||||
// todo
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <qglobal.h>
|
||||
# include <iomanip>
|
||||
# include <ios>
|
||||
#endif
|
||||
|
@ -195,6 +196,7 @@ void SoFCVectorizeU3DActionP::printText(const SoVectorizeText * item) const
|
|||
|
||||
//std::ostream& str = publ->getU3DOutput()->getFileStream();
|
||||
// todo
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
void SoFCVectorizeU3DActionP::printTriangle(const SoVectorizeTriangle * item) const
|
||||
|
@ -224,16 +226,23 @@ void SoFCVectorizeU3DActionP::printTriangle(const SbVec3f * v, const SbColor * c
|
|||
|
||||
//std::ostream& str = publ->getU3DOutput()->getFileStream();
|
||||
// todo
|
||||
Q_UNUSED(c);
|
||||
}
|
||||
|
||||
void SoFCVectorizeU3DActionP::printCircle(const SbVec3f & v, const SbColor & c, const float radius) const
|
||||
{
|
||||
// todo
|
||||
Q_UNUSED(v);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(radius);
|
||||
}
|
||||
|
||||
void SoFCVectorizeU3DActionP::printSquare(const SbVec3f & v, const SbColor & c, const float size) const
|
||||
{
|
||||
// todo
|
||||
Q_UNUSED(v);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(size);
|
||||
}
|
||||
|
||||
void SoFCVectorizeU3DActionP::printLine(const SoVectorizeLine * item) const
|
||||
|
@ -257,16 +266,19 @@ void SoFCVectorizeU3DActionP::printLine(const SoVectorizeLine * item) const
|
|||
|
||||
//std::ostream& str = publ->getU3DOutput()->getFileStream();
|
||||
// todo
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
void SoFCVectorizeU3DActionP::printPoint(const SoVectorizePoint * item) const
|
||||
{
|
||||
// todo
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
void SoFCVectorizeU3DActionP::printImage(const SoVectorizeImage * item) const
|
||||
{
|
||||
// todo
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------
|
||||
|
@ -300,6 +312,8 @@ SoFCVectorizeU3DAction::getU3DOutput(void) const
|
|||
void
|
||||
SoFCVectorizeU3DAction::actionMethod(SoAction * a, SoNode * n)
|
||||
{
|
||||
Q_UNUSED(a);
|
||||
Q_UNUSED(n);
|
||||
}
|
||||
|
||||
void SoFCVectorizeU3DAction::beginTraversal(SoNode * node)
|
||||
|
|
|
@ -42,6 +42,7 @@ SO_EVENT_SOURCE(SoGesturePanEvent);
|
|||
|
||||
SoGesturePanEvent::SoGesturePanEvent(QPanGesture* qpan, QWidget *widget)
|
||||
{
|
||||
Q_UNUSED(widget);
|
||||
totalOffset = SbVec2f(qpan->offset().x(), -qpan->offset().y());
|
||||
deltaOffset = SbVec2f(qpan->delta().x(), -qpan->delta().y());
|
||||
state = SbGestureState(qpan->state());
|
||||
|
@ -107,6 +108,7 @@ SO_EVENT_SOURCE(SoGestureSwipeEvent);
|
|||
|
||||
SoGestureSwipeEvent::SoGestureSwipeEvent(QSwipeGesture *qwsipe, QWidget *widget)
|
||||
{
|
||||
Q_UNUSED(widget);
|
||||
angle = qwsipe->swipeAngle();
|
||||
switch (qwsipe->verticalDirection()){
|
||||
case QSwipeGesture::Up :
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace Gui {
|
|||
class SplashObserver : public Base::ConsoleObserver
|
||||
{
|
||||
public:
|
||||
SplashObserver(QSplashScreen* splasher=0, const char* name=0)
|
||||
SplashObserver(QSplashScreen* splasher=0)
|
||||
: splash(splasher), alignment(Qt::AlignBottom|Qt::AlignLeft), textColor(Qt::black)
|
||||
{
|
||||
Base::Console().AttachObserver(this);
|
||||
|
@ -219,6 +219,8 @@ void AboutDialogFactory::setDefaultFactory(AboutDialogFactory *f)
|
|||
AboutDialog::AboutDialog(bool showLic, QWidget* parent)
|
||||
: QDialog(parent, Qt::FramelessWindowHint), ui(new Ui_AboutApplication)
|
||||
{
|
||||
Q_UNUSED(showLic);
|
||||
|
||||
setModal(true);
|
||||
ui->setupUi(this);
|
||||
ui->labelSplashPicture->setPixmap(getMainWindow()->splashImage());
|
||||
|
|
|
@ -268,7 +268,7 @@ const char *AbstractSplitView::getName(void) const
|
|||
return "SplitView3DInventor";
|
||||
}
|
||||
|
||||
bool AbstractSplitView::onMsg(const char* pMsg, const char** ppReturn)
|
||||
bool AbstractSplitView::onMsg(const char* pMsg, const char**)
|
||||
{
|
||||
if (strcmp("ViewFit",pMsg) == 0 ) {
|
||||
for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it)
|
||||
|
@ -369,6 +369,7 @@ bool AbstractSplitView::onHasMsg(const char* pMsg) const
|
|||
|
||||
void AbstractSplitView::setOverrideCursor(const QCursor& aCursor)
|
||||
{
|
||||
Q_UNUSED(aCursor);
|
||||
//_viewer->getWidget()->setCursor(aCursor);
|
||||
}
|
||||
|
||||
|
|
|
@ -157,6 +157,8 @@ QColor SyntaxHighlighter::colorByType(SyntaxHighlighter::TColor type)
|
|||
|
||||
void SyntaxHighlighter::colorChanged(const QString& type, const QColor& col)
|
||||
{
|
||||
Q_UNUSED(type);
|
||||
Q_UNUSED(col);
|
||||
// rehighlight
|
||||
#if QT_VERSION >= 0x040200
|
||||
rehighlight();
|
||||
|
|
|
@ -79,6 +79,7 @@ void TaskAppearance::changeEvent(QEvent *e)
|
|||
void TaskAppearance::OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
|
||||
Gui::SelectionSingleton::MessageType Reason)
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
if (Reason.Type == SelectionChanges::AddSelection ||
|
||||
Reason.Type == SelectionChanges::RmvSelection ||
|
||||
Reason.Type == SelectionChanges::SetSelection ||
|
||||
|
@ -199,53 +200,53 @@ void TaskAppearance::on_spinLineWidth_valueChanged(int linewidth)
|
|||
|
||||
void TaskAppearance::setDisplayModes(const std::vector<Gui::ViewProvider*>& views)
|
||||
{
|
||||
QStringList commonModes, modes;
|
||||
for (std::vector<Gui::ViewProvider*>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
App::Property* prop = (*it)->getPropertyByName("DisplayMode");
|
||||
QStringList commonModes, modes;
|
||||
for (std::vector<Gui::ViewProvider*>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
App::Property* prop = (*it)->getPropertyByName("DisplayMode");
|
||||
if (prop && prop->getTypeId() == App::PropertyEnumeration::getClassTypeId()) {
|
||||
App::PropertyEnumeration* display = static_cast<App::PropertyEnumeration*>(prop);
|
||||
if (!display->getEnums()) return;
|
||||
const std::vector<std::string>& value = display->getEnumVector();
|
||||
if (it == views.begin()) {
|
||||
for (std::vector<std::string>::const_iterator jt = value.begin(); jt != value.end(); ++jt)
|
||||
commonModes << QLatin1String(jt->c_str());
|
||||
}
|
||||
else {
|
||||
for (std::vector<std::string>::const_iterator jt = value.begin(); jt != value.end(); ++jt) {
|
||||
if (commonModes.contains(QLatin1String(jt->c_str())))
|
||||
modes << QLatin1String(jt->c_str());
|
||||
}
|
||||
|
||||
commonModes = modes;
|
||||
modes.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ui->changeMode->clear();
|
||||
ui->changeMode->addItems(commonModes);
|
||||
ui->changeMode->setDisabled(commonModes.isEmpty());
|
||||
|
||||
// find the display mode to activate
|
||||
for (std::vector<Gui::ViewProvider*>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
App::Property* prop = (*it)->getPropertyByName("DisplayMode");
|
||||
App::PropertyEnumeration* display = static_cast<App::PropertyEnumeration*>(prop);
|
||||
if (!display->getEnums()) return;
|
||||
const std::vector<std::string>& value = display->getEnumVector();
|
||||
if (it == views.begin()) {
|
||||
for (std::vector<std::string>::const_iterator jt = value.begin(); jt != value.end(); ++jt)
|
||||
commonModes << QLatin1String(jt->c_str());
|
||||
}
|
||||
else {
|
||||
for (std::vector<std::string>::const_iterator jt = value.begin(); jt != value.end(); ++jt) {
|
||||
if (commonModes.contains(QLatin1String(jt->c_str())))
|
||||
modes << QLatin1String(jt->c_str());
|
||||
}
|
||||
|
||||
commonModes = modes;
|
||||
modes.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ui->changeMode->clear();
|
||||
ui->changeMode->addItems(commonModes);
|
||||
ui->changeMode->setDisabled(commonModes.isEmpty());
|
||||
|
||||
// find the display mode to activate
|
||||
for (std::vector<Gui::ViewProvider*>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
App::Property* prop = (*it)->getPropertyByName("DisplayMode");
|
||||
if (prop && prop->getTypeId() == App::PropertyEnumeration::getClassTypeId()) {
|
||||
App::PropertyEnumeration* display = static_cast<App::PropertyEnumeration*>(prop);
|
||||
App::PropertyEnumeration* display = static_cast<App::PropertyEnumeration*>(prop);
|
||||
QString activeMode = QString::fromLatin1(display->getValueAsString());
|
||||
int index = ui->changeMode->findText(activeMode);
|
||||
if (index != -1) {
|
||||
ui->changeMode->setCurrentIndex(index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int index = ui->changeMode->findText(activeMode);
|
||||
if (index != -1) {
|
||||
ui->changeMode->setCurrentIndex(index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TaskAppearance::setPointSize(const std::vector<Gui::ViewProvider*>& views)
|
||||
{
|
||||
bool pointSize = false;
|
||||
for (std::vector<Gui::ViewProvider*>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
App::Property* prop = (*it)->getPropertyByName("PointSize");
|
||||
for (std::vector<Gui::ViewProvider*>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
App::Property* prop = (*it)->getPropertyByName("PointSize");
|
||||
if (prop && prop->getTypeId().isDerivedFrom(App::PropertyFloat::getClassTypeId())) {
|
||||
bool blocked = ui->spinPointSize->blockSignals(true);
|
||||
ui->spinPointSize->setValue((int)static_cast<App::PropertyFloat*>(prop)->getValue());
|
||||
|
@ -253,16 +254,16 @@ void TaskAppearance::setPointSize(const std::vector<Gui::ViewProvider*>& views)
|
|||
pointSize = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ui->spinPointSize->setEnabled(pointSize);
|
||||
}
|
||||
|
||||
ui->spinPointSize->setEnabled(pointSize);
|
||||
}
|
||||
|
||||
void TaskAppearance::setLineWidth(const std::vector<Gui::ViewProvider*>& views)
|
||||
{
|
||||
bool lineWidth = false;
|
||||
for (std::vector<Gui::ViewProvider*>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
App::Property* prop = (*it)->getPropertyByName("LineWidth");
|
||||
for (std::vector<Gui::ViewProvider*>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
App::Property* prop = (*it)->getPropertyByName("LineWidth");
|
||||
if (prop && prop->getTypeId().isDerivedFrom(App::PropertyFloat::getClassTypeId())) {
|
||||
bool blocked = ui->spinLineWidth->blockSignals(true);
|
||||
ui->spinLineWidth->setValue((int)static_cast<App::PropertyFloat*>(prop)->getValue());
|
||||
|
@ -270,16 +271,16 @@ void TaskAppearance::setLineWidth(const std::vector<Gui::ViewProvider*>& views)
|
|||
lineWidth = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ui->spinLineWidth->setEnabled(lineWidth);
|
||||
}
|
||||
|
||||
ui->spinLineWidth->setEnabled(lineWidth);
|
||||
}
|
||||
|
||||
void TaskAppearance::setTransparency(const std::vector<Gui::ViewProvider*>& views)
|
||||
{
|
||||
bool transparency = false;
|
||||
for (std::vector<Gui::ViewProvider*>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
App::Property* prop = (*it)->getPropertyByName("Transparency");
|
||||
for (std::vector<Gui::ViewProvider*>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
App::Property* prop = (*it)->getPropertyByName("Transparency");
|
||||
if (prop && prop->getTypeId().isDerivedFrom(App::PropertyInteger::getClassTypeId())) {
|
||||
bool blocked = ui->spinTransparency->blockSignals(true);
|
||||
ui->spinTransparency->setValue(static_cast<App::PropertyInteger*>(prop)->getValue());
|
||||
|
@ -287,10 +288,10 @@ void TaskAppearance::setTransparency(const std::vector<Gui::ViewProvider*>& view
|
|||
transparency = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ui->spinTransparency->setEnabled(transparency);
|
||||
ui->horizontalSlider->setEnabled(transparency);
|
||||
}
|
||||
|
||||
ui->spinTransparency->setEnabled(transparency);
|
||||
ui->horizontalSlider->setEnabled(transparency);
|
||||
}
|
||||
|
||||
std::vector<Gui::ViewProvider*> TaskAppearance::getSelection() const
|
||||
|
|
|
@ -98,7 +98,7 @@ Py::Object ControlPy::showDialog(const Py::Tuple& args)
|
|||
return Py::None();
|
||||
}
|
||||
|
||||
Py::Object ControlPy::activeDialog(const Py::Tuple& args)
|
||||
Py::Object ControlPy::activeDialog(const Py::Tuple&)
|
||||
{
|
||||
Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog();
|
||||
return Py::Boolean(dlg!=0);
|
||||
|
|
|
@ -207,6 +207,7 @@ void TaskSelectLinkProperty::checkSelectionStatus(void)
|
|||
void TaskSelectLinkProperty::OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
|
||||
Gui::SelectionSingleton::MessageType Reason)
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
if (Reason.Type == SelectionChanges::AddSelection ||
|
||||
Reason.Type == SelectionChanges::RmvSelection ||
|
||||
Reason.Type == SelectionChanges::SetSelection ||
|
||||
|
|
|
@ -468,6 +468,7 @@ void TaskView::keyPressEvent(QKeyEvent* ke)
|
|||
|
||||
void TaskView::slotActiveDocument(const App::Document& doc)
|
||||
{
|
||||
Q_UNUSED(doc);
|
||||
if (!ActiveDialog)
|
||||
updateWatcher();
|
||||
}
|
||||
|
@ -494,6 +495,7 @@ void TaskView::slotRedoDocument(const App::Document&)
|
|||
void TaskView::OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
|
||||
Gui::SelectionSingleton::MessageType Reason)
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
std::string temp;
|
||||
|
||||
if (Reason.Type == SelectionChanges::AddSelection ||
|
||||
|
|
|
@ -289,6 +289,10 @@ void TextEditor::highlightCurrentLine()
|
|||
|
||||
void TextEditor::drawMarker(int line, int x, int y, QPainter* p)
|
||||
{
|
||||
Q_UNUSED(line);
|
||||
Q_UNUSED(x);
|
||||
Q_UNUSED(y);
|
||||
Q_UNUSED(p);
|
||||
}
|
||||
|
||||
void TextEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
|
||||
|
@ -414,6 +418,7 @@ void TextEditor::keyPressEvent (QKeyEvent * e)
|
|||
/** Sets the font, font size and tab size of the editor. */
|
||||
void TextEditor::OnChange(Base::Subject<const char*> &rCaller,const char* sReason)
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
ParameterGrp::handle hPrefGrp = getWindowParameter();
|
||||
if (strcmp(sReason, "FontSize") == 0 || strcmp(sReason, "Font") == 0) {
|
||||
#ifdef FC_OS_LINUX
|
||||
|
|
|
@ -79,6 +79,7 @@ void Thumbnail::Save (Base::Writer &writer) const
|
|||
|
||||
void Thumbnail::Restore(Base::XMLReader &reader)
|
||||
{
|
||||
Q_UNUSED(reader);
|
||||
//reader.addFile("Thumbnail.png",this);
|
||||
}
|
||||
|
||||
|
@ -124,6 +125,7 @@ void Thumbnail::SaveDocFile (Base::Writer &writer) const
|
|||
|
||||
void Thumbnail::RestoreDocFile(Base::Reader &reader)
|
||||
{
|
||||
Q_UNUSED(reader);
|
||||
}
|
||||
|
||||
void Thumbnail::createThumbnailFromFramebuffer(QImage& img) const
|
||||
|
|
|
@ -58,4 +58,6 @@ void TransactionViewProvider::applyNew(App::Document& Doc, App::TransactionalObj
|
|||
void TransactionViewProvider::applyDel(App::Document& Doc, App::TransactionalObject* pcObj)
|
||||
{
|
||||
// nothing to do here
|
||||
Q_UNUSED(Doc);
|
||||
Q_UNUSED(pcObj);
|
||||
}
|
||||
|
|
|
@ -626,6 +626,7 @@ void TreeWidget::slotDeleteDocument(const Gui::Document& Doc)
|
|||
void TreeWidget::slotRenameDocument(const Gui::Document& Doc)
|
||||
{
|
||||
// do nothing here
|
||||
Q_UNUSED(Doc);
|
||||
}
|
||||
|
||||
void TreeWidget::slotRelabelDocument(const Gui::Document& Doc)
|
||||
|
@ -1054,6 +1055,7 @@ void DocumentItem::slotChangeObject(const Gui::ViewProviderDocumentObject& view)
|
|||
void DocumentItem::slotRenameObject(const Gui::ViewProviderDocumentObject& obj)
|
||||
{
|
||||
// Do nothing here because the Label is set in slotChangeObject
|
||||
Q_UNUSED(obj);
|
||||
}
|
||||
|
||||
void DocumentItem::slotActiveObject(const Gui::ViewProviderDocumentObject& obj)
|
||||
|
@ -1184,6 +1186,7 @@ void DocumentItem::setData (int column, int role, const QVariant & value)
|
|||
|
||||
void DocumentItem::setObjectHighlighted(const char* name, bool select)
|
||||
{
|
||||
Q_UNUSED(select);
|
||||
std::map<std::string,DocumentObjectItem*>::iterator pos;
|
||||
pos = ObjectMap.find(name);
|
||||
if (pos != ObjectMap.end()) {
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
|
||||
using namespace Gui;
|
||||
|
||||
void GLOverlayWidget::paintEvent(QPaintEvent* ev)
|
||||
void GLOverlayWidget::paintEvent(QPaintEvent*)
|
||||
{
|
||||
QPainter paint(this);
|
||||
paint.drawImage(0,0,image);
|
||||
|
@ -1034,7 +1034,7 @@ void View3DInventor::keyReleaseEvent (QKeyEvent* e)
|
|||
QMainWindow::keyReleaseEvent(e);
|
||||
}
|
||||
|
||||
void View3DInventor::focusInEvent (QFocusEvent * e)
|
||||
void View3DInventor::focusInEvent (QFocusEvent *)
|
||||
{
|
||||
_viewer->getGLWidget()->setFocus();
|
||||
}
|
||||
|
|
|
@ -196,7 +196,7 @@ void doClipping(SbVec3f trans, SbRotation rot)
|
|||
planeTVerts->finishEditing();
|
||||
}
|
||||
|
||||
void draggerCB(void * data, SoDragger * dragger)
|
||||
void draggerCB(void * /*data*/, SoDragger * dragger)
|
||||
{
|
||||
SoTransformerDragger * drag = (SoTransformerDragger *)dragger;
|
||||
doClipping(drag->translation.getValue(), drag->rotation.getValue());
|
||||
|
|
|
@ -590,6 +590,7 @@ void View3DInventorViewer::initialize()
|
|||
void View3DInventorViewer::OnChange(Gui::SelectionSingleton::SubjectType& rCaller,
|
||||
Gui::SelectionSingleton::MessageType Reason)
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
if (Reason.Type == SelectionChanges::AddSelection ||
|
||||
Reason.Type == SelectionChanges::RmvSelection ||
|
||||
Reason.Type == SelectionChanges::SetSelection ||
|
||||
|
@ -715,7 +716,7 @@ void View3DInventorViewer::updateOverrideMode(const std::string& mode)
|
|||
overrideMode = mode;
|
||||
}
|
||||
|
||||
void View3DInventorViewer::setViewportCB(void* userdata, SoAction* action)
|
||||
void View3DInventorViewer::setViewportCB(void*, SoAction* action)
|
||||
{
|
||||
// Make sure to override the value set inside SoOffscreenRenderer::render()
|
||||
if (action->isOfType(SoGLRenderAction::getClassTypeId())) {
|
||||
|
@ -726,7 +727,7 @@ void View3DInventorViewer::setViewportCB(void* userdata, SoAction* action)
|
|||
}
|
||||
}
|
||||
|
||||
void View3DInventorViewer::clearBufferCB(void* userdata, SoAction* action)
|
||||
void View3DInventorViewer::clearBufferCB(void*, SoAction* action)
|
||||
{
|
||||
if (action->isOfType(SoGLRenderAction::getClassTypeId())) {
|
||||
// do stuff specific for GL rendering here.
|
||||
|
@ -1188,7 +1189,7 @@ bool View3DInventorViewer::dumpToFile(SoNode* node, const char* filename, bool b
|
|||
/**
|
||||
* Sets the SoFCInteractiveElement to \a true.
|
||||
*/
|
||||
void View3DInventorViewer::interactionStartCB(void* data, SoQTQuarterAdaptor* viewer)
|
||||
void View3DInventorViewer::interactionStartCB(void*, SoQTQuarterAdaptor* viewer)
|
||||
{
|
||||
SoGLRenderAction* glra = viewer->getSoRenderManager()->getGLRenderAction();
|
||||
SoFCInteractiveElement::set(glra->getState(), viewer->getSceneGraph(), true);
|
||||
|
@ -1197,7 +1198,7 @@ void View3DInventorViewer::interactionStartCB(void* data, SoQTQuarterAdaptor* vi
|
|||
/**
|
||||
* Sets the SoFCInteractiveElement to \a false and forces a redraw.
|
||||
*/
|
||||
void View3DInventorViewer::interactionFinishCB(void* data, SoQTQuarterAdaptor* viewer)
|
||||
void View3DInventorViewer::interactionFinishCB(void*, SoQTQuarterAdaptor* viewer)
|
||||
{
|
||||
SoGLRenderAction* glra = viewer->getSoRenderManager()->getGLRenderAction();
|
||||
SoFCInteractiveElement::set(glra->getState(), viewer->getSceneGraph(), false);
|
||||
|
@ -1207,7 +1208,7 @@ void View3DInventorViewer::interactionFinishCB(void* data, SoQTQuarterAdaptor* v
|
|||
/**
|
||||
* Logs the type of the action that traverses the Inventor tree.
|
||||
*/
|
||||
void View3DInventorViewer::interactionLoggerCB(void* ud, SoAction* action)
|
||||
void View3DInventorViewer::interactionLoggerCB(void*, SoAction* action)
|
||||
{
|
||||
Base::Console().Log("%s\n", action->getTypeId().getName().getString());
|
||||
}
|
||||
|
@ -2268,7 +2269,7 @@ View3DInventorViewer::getFeedbackSize(void) const
|
|||
Decide whether or not the mouse pointer cursor should be visible in
|
||||
the rendering canvas.
|
||||
*/
|
||||
void View3DInventorViewer::setCursorEnabled(SbBool enable)
|
||||
void View3DInventorViewer::setCursorEnabled(SbBool /*enable*/)
|
||||
{
|
||||
this->setCursorRepresentation(navigation->getViewingMode());
|
||||
}
|
||||
|
|
|
@ -123,15 +123,18 @@ void ViewProvider::finishEditing()
|
|||
|
||||
bool ViewProvider::setEdit(int ModNum)
|
||||
{
|
||||
Q_UNUSED(ModNum);
|
||||
return true;
|
||||
}
|
||||
|
||||
void ViewProvider::unsetEdit(int ModNum)
|
||||
{
|
||||
Q_UNUSED(ModNum);
|
||||
}
|
||||
|
||||
void ViewProvider::setEditViewer(View3DInventorViewer*, int ModNum)
|
||||
{
|
||||
Q_UNUSED(ModNum);
|
||||
}
|
||||
|
||||
void ViewProvider::unsetEditViewer(View3DInventorViewer*)
|
||||
|
@ -150,8 +153,7 @@ void ViewProvider::setUpdatesEnabled (bool enable)
|
|||
|
||||
void highlight(const HighlightMode& high)
|
||||
{
|
||||
|
||||
|
||||
Q_UNUSED(high);
|
||||
}
|
||||
|
||||
void ViewProvider::eventCallback(void * ud, SoEventCallback * node)
|
||||
|
|
|
@ -129,16 +129,20 @@ public:
|
|||
virtual SoDetail* getDetail(const char*) const { return 0; }
|
||||
virtual std::vector<Base::Vector3d> getModelPoints(const SoPickedPoint *) const;
|
||||
/// return the higlight lines for a given element or the whole shape
|
||||
virtual std::vector<Base::Vector3d> getSelectionShape(const char* Element) const
|
||||
{ return std::vector<Base::Vector3d>(); }
|
||||
virtual std::vector<Base::Vector3d> getSelectionShape(const char* Element) const {
|
||||
(void)Element;
|
||||
return std::vector<Base::Vector3d>();
|
||||
}
|
||||
/**
|
||||
* Get called if the object is about to get deleted.
|
||||
* Here you can delete other objects, switch their visibility or prevent the deletion of the object.
|
||||
* @param subNames list of selected subelements
|
||||
* @return true if the deletion is approoved by the view provider.
|
||||
*/
|
||||
virtual bool onDelete(const std::vector<std::string> &subNames)
|
||||
{ return true;}
|
||||
virtual bool onDelete(const std::vector<std::string> &subNames) {
|
||||
(void)subNames;
|
||||
return true;
|
||||
}
|
||||
//@}
|
||||
|
||||
|
||||
|
@ -286,17 +290,29 @@ public:
|
|||
//@}
|
||||
|
||||
/// is called when the provider is in edit and a key event occurs. Only ESC ends edit.
|
||||
virtual bool keyPressed(bool pressed, int key) { return false; }
|
||||
virtual bool keyPressed(bool pressed, int key) {
|
||||
(void)pressed;
|
||||
(void)key;
|
||||
return false;
|
||||
}
|
||||
/// is called by the tree if the user double click on the object
|
||||
virtual bool doubleClicked(void) { return false; }
|
||||
/// is called when the provider is in edit and the mouse is moved
|
||||
virtual bool mouseMove(const SbVec2s &cursorPos,
|
||||
View3DInventorViewer* viewer)
|
||||
{ return false; }
|
||||
View3DInventorViewer* viewer) {
|
||||
(void)cursorPos;
|
||||
(void)viewer;
|
||||
return false;
|
||||
}
|
||||
/// is called when the Provider is in edit and the mouse is clicked
|
||||
virtual bool mouseButtonPressed(int button, bool pressed, const SbVec2s &cursorPos,
|
||||
const View3DInventorViewer* viewer)
|
||||
{ return false; }
|
||||
const View3DInventorViewer* viewer) {
|
||||
(void)button;
|
||||
(void)pressed;
|
||||
(void)cursorPos;
|
||||
(void)viewer;
|
||||
return false;
|
||||
}
|
||||
/// set up the context-menu with the supported edit modes
|
||||
virtual void setupContextMenu(QMenu*, QObject*, const char*) {}
|
||||
|
||||
|
|
|
@ -388,13 +388,13 @@ void ViewProviderAnnotationLabel::setupContextMenu(QMenu* menu, QObject* receive
|
|||
menu->addAction(QObject::tr("Move annotation"), receiver, member);
|
||||
}
|
||||
|
||||
void ViewProviderAnnotationLabel::dragStartCallback(void *data, SoDragger *)
|
||||
void ViewProviderAnnotationLabel::dragStartCallback(void *, SoDragger *)
|
||||
{
|
||||
// This is called when a manipulator is about to manipulating
|
||||
Gui::Application::Instance->activeDocument()->openCommand("Transform");
|
||||
}
|
||||
|
||||
void ViewProviderAnnotationLabel::dragFinishCallback(void *data, SoDragger *)
|
||||
void ViewProviderAnnotationLabel::dragFinishCallback(void *, SoDragger *)
|
||||
{
|
||||
// This is called when a manipulator has done manipulating
|
||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||
|
@ -412,6 +412,7 @@ void ViewProviderAnnotationLabel::dragMotionCallback(void *data, SoDragger *drag
|
|||
|
||||
bool ViewProviderAnnotationLabel::setEdit(int ModNum)
|
||||
{
|
||||
Q_UNUSED(ModNum);
|
||||
SoSearchAction sa;
|
||||
sa.setInterest(SoSearchAction::FIRST);
|
||||
sa.setSearchingAll(false);
|
||||
|
@ -432,6 +433,7 @@ bool ViewProviderAnnotationLabel::setEdit(int ModNum)
|
|||
|
||||
void ViewProviderAnnotationLabel::unsetEdit(int ModNum)
|
||||
{
|
||||
Q_UNUSED(ModNum);
|
||||
SoSearchAction sa;
|
||||
sa.setType(TranslateManip::getClassTypeId());
|
||||
sa.setInterest(SoSearchAction::FIRST);
|
||||
|
|
|
@ -285,10 +285,25 @@ PyObject* ViewProviderDocumentObject::getPyObject()
|
|||
return pyViewObject;
|
||||
}
|
||||
|
||||
bool ViewProviderDocumentObject::allowDrop(const std::vector<const App::DocumentObject*> &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos)
|
||||
bool ViewProviderDocumentObject::allowDrop(const std::vector<const App::DocumentObject*> &objList,
|
||||
Qt::KeyboardModifiers keys,
|
||||
Qt::MouseButtons mouseBts,
|
||||
const QPoint &pos)
|
||||
{
|
||||
Q_UNUSED(objList);
|
||||
Q_UNUSED(keys);
|
||||
Q_UNUSED(mouseBts);
|
||||
Q_UNUSED(pos);
|
||||
return false;
|
||||
}
|
||||
void ViewProviderDocumentObject::drop(const std::vector<const App::DocumentObject*> &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos)
|
||||
|
||||
void ViewProviderDocumentObject::drop(const std::vector<const App::DocumentObject*> &objList,
|
||||
Qt::KeyboardModifiers keys,
|
||||
Qt::MouseButtons mouseBts,
|
||||
const QPoint &pos)
|
||||
{
|
||||
Q_UNUSED(objList);
|
||||
Q_UNUSED(keys);
|
||||
Q_UNUSED(mouseBts);
|
||||
Q_UNUSED(pos);
|
||||
}
|
||||
|
|
|
@ -96,9 +96,15 @@ public:
|
|||
/** @name drag & drop handling */
|
||||
//@{
|
||||
/// get called if the user hover over a object in the tree
|
||||
virtual bool allowDrop(const std::vector<const App::DocumentObject*> &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos);
|
||||
virtual bool allowDrop(const std::vector<const App::DocumentObject*> &objList,
|
||||
Qt::KeyboardModifiers keys,
|
||||
Qt::MouseButtons mouseBts,
|
||||
const QPoint &pos);
|
||||
/// get called if the user drops some objects
|
||||
virtual void drop(const std::vector<const App::DocumentObject*> &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos);
|
||||
virtual void drop(const std::vector<const App::DocumentObject*> &objList,
|
||||
Qt::KeyboardModifiers keys,
|
||||
Qt::MouseButtons mouseBts,
|
||||
const QPoint &pos);
|
||||
//@}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -117,6 +117,8 @@ void ViewProviderDocumentObjectGroup::updateData(const App::Property* prop)
|
|||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(prop);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -177,8 +179,15 @@ bool ViewProviderDocumentObjectGroup::onDelete(const std::vector<std::string> &)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ViewProviderDocumentObjectGroup::allowDrop(const std::vector<const App::DocumentObject*> &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos)
|
||||
bool ViewProviderDocumentObjectGroup::allowDrop(const std::vector<const App::DocumentObject*> &objList,
|
||||
Qt::KeyboardModifiers keys,
|
||||
Qt::MouseButtons mouseBts,
|
||||
const QPoint &pos)
|
||||
{
|
||||
Q_UNUSED(keys);
|
||||
Q_UNUSED(mouseBts);
|
||||
Q_UNUSED(pos);
|
||||
|
||||
for( std::vector<const App::DocumentObject*>::const_iterator it = objList.begin();it!=objList.end();++it)
|
||||
if ((*it)->getTypeId().isDerivedFrom(App::DocumentObjectGroup::getClassTypeId())) {
|
||||
if (static_cast<App::DocumentObjectGroup*>(getObject())->isChildOf(
|
||||
|
@ -189,40 +198,47 @@ bool ViewProviderDocumentObjectGroup::allowDrop(const std::vector<const App::Doc
|
|||
|
||||
return true;
|
||||
}
|
||||
void ViewProviderDocumentObjectGroup::drop(const std::vector<const App::DocumentObject*> &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos)
|
||||
{
|
||||
// Open command
|
||||
App::DocumentObjectGroup* grp = static_cast<App::DocumentObjectGroup*>(getObject());
|
||||
App::Document* doc = grp->getDocument();
|
||||
Gui::Document* gui = Gui::Application::Instance->getDocument(doc);
|
||||
gui->openCommand("Move object");
|
||||
for( std::vector<const App::DocumentObject*>::const_iterator it = objList.begin();it!=objList.end();++it) {
|
||||
// get document object
|
||||
const App::DocumentObject* obj = *it;
|
||||
const App::DocumentObjectGroup* par = App::DocumentObjectGroup::getGroupOfObject(obj);
|
||||
if (par) {
|
||||
// allow an object to be in one group only
|
||||
QString cmd;
|
||||
cmd = QString::fromLatin1("App.getDocument(\"%1\").getObject(\"%2\").removeObject("
|
||||
"App.getDocument(\"%1\").getObject(\"%3\"))")
|
||||
.arg(QString::fromLatin1(doc->getName()))
|
||||
.arg(QString::fromLatin1(par->getNameInDocument()))
|
||||
.arg(QString::fromLatin1(obj->getNameInDocument()));
|
||||
Gui::Command::runCommand(Gui::Command::App, cmd.toUtf8());
|
||||
}
|
||||
|
||||
// build Python command for execution
|
||||
void ViewProviderDocumentObjectGroup::drop(const std::vector<const App::DocumentObject*> &objList,
|
||||
Qt::KeyboardModifiers keys,
|
||||
Qt::MouseButtons mouseBts,
|
||||
const QPoint &pos)
|
||||
{
|
||||
Q_UNUSED(keys);
|
||||
Q_UNUSED(mouseBts);
|
||||
Q_UNUSED(pos);
|
||||
|
||||
// Open command
|
||||
App::DocumentObjectGroup* grp = static_cast<App::DocumentObjectGroup*>(getObject());
|
||||
App::Document* doc = grp->getDocument();
|
||||
Gui::Document* gui = Gui::Application::Instance->getDocument(doc);
|
||||
gui->openCommand("Move object");
|
||||
for( std::vector<const App::DocumentObject*>::const_iterator it = objList.begin();it!=objList.end();++it) {
|
||||
// get document object
|
||||
const App::DocumentObject* obj = *it;
|
||||
const App::DocumentObjectGroup* par = App::DocumentObjectGroup::getGroupOfObject(obj);
|
||||
if (par) {
|
||||
// allow an object to be in one group only
|
||||
QString cmd;
|
||||
cmd = QString::fromLatin1("App.getDocument(\"%1\").getObject(\"%2\").addObject("
|
||||
cmd = QString::fromLatin1("App.getDocument(\"%1\").getObject(\"%2\").removeObject("
|
||||
"App.getDocument(\"%1\").getObject(\"%3\"))")
|
||||
.arg(QString::fromLatin1(doc->getName()))
|
||||
.arg(QString::fromLatin1(grp->getNameInDocument()))
|
||||
.arg(QString::fromLatin1(par->getNameInDocument()))
|
||||
.arg(QString::fromLatin1(obj->getNameInDocument()));
|
||||
|
||||
Gui::Command::runCommand(Gui::Command::App, cmd.toUtf8());
|
||||
}
|
||||
gui->commitCommand();
|
||||
|
||||
// build Python command for execution
|
||||
QString cmd;
|
||||
cmd = QString::fromLatin1("App.getDocument(\"%1\").getObject(\"%2\").addObject("
|
||||
"App.getDocument(\"%1\").getObject(\"%3\"))")
|
||||
.arg(QString::fromLatin1(doc->getName()))
|
||||
.arg(QString::fromLatin1(grp->getNameInDocument()))
|
||||
.arg(QString::fromLatin1(obj->getNameInDocument()));
|
||||
|
||||
Gui::Command::runCommand(Gui::Command::App, cmd.toUtf8());
|
||||
}
|
||||
gui->commitCommand();
|
||||
}
|
||||
|
||||
void ViewProviderDocumentObjectGroup::hide(void)
|
||||
|
|
|
@ -59,9 +59,15 @@ public:
|
|||
virtual bool onDelete(const std::vector<std::string> &);
|
||||
|
||||
/// get called if the user hover over a object in the tree
|
||||
virtual bool allowDrop(const std::vector<const App::DocumentObject*> &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos);
|
||||
virtual bool allowDrop(const std::vector<const App::DocumentObject*> &objList,
|
||||
Qt::KeyboardModifiers keys,
|
||||
Qt::MouseButtons mouseBts,
|
||||
const QPoint &pos);
|
||||
/// get called if the user drops some objects
|
||||
virtual void drop(const std::vector<const App::DocumentObject*> &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos);
|
||||
virtual void drop(const std::vector<const App::DocumentObject*> &objList,
|
||||
Qt::KeyboardModifiers keys,
|
||||
Qt::MouseButtons mouseBts,
|
||||
const QPoint &pos);
|
||||
|
||||
protected:
|
||||
/// get called by the container whenever a property has been changed
|
||||
|
|
|
@ -196,6 +196,8 @@ void ViewProviderGeometryObject::setupContextMenu(QMenu* menu, QObject* receiver
|
|||
|
||||
bool ViewProviderGeometryObject::setEdit(int ModNum)
|
||||
{
|
||||
Q_UNUSED(ModNum);
|
||||
|
||||
App::DocumentObject *genericObject = this->getObject();
|
||||
if (genericObject->isDerivedFrom(App::GeoFeature::getClassTypeId()))
|
||||
{
|
||||
|
@ -230,6 +232,8 @@ bool ViewProviderGeometryObject::setEdit(int ModNum)
|
|||
|
||||
void ViewProviderGeometryObject::unsetEdit(int ModNum)
|
||||
{
|
||||
Q_UNUSED(ModNum);
|
||||
|
||||
if(csysDragger)
|
||||
{
|
||||
pcTransform->translation.disconnect(&csysDragger->translation);
|
||||
|
@ -243,6 +247,8 @@ void ViewProviderGeometryObject::unsetEdit(int ModNum)
|
|||
|
||||
void ViewProviderGeometryObject::setEditViewer(Gui::View3DInventorViewer* viewer, int ModNum)
|
||||
{
|
||||
Q_UNUSED(ModNum);
|
||||
|
||||
if (csysDragger && viewer)
|
||||
{
|
||||
SoPickStyle *rootPickStyle = new SoPickStyle();
|
||||
|
@ -259,7 +265,7 @@ void ViewProviderGeometryObject::unsetEditViewer(Gui::View3DInventorViewer* view
|
|||
static_cast<SoFCUnifiedSelection*>(viewer->getSceneGraph())->removeChild(child);
|
||||
}
|
||||
|
||||
void ViewProviderGeometryObject::dragStartCallback(void *data, SoDragger *)
|
||||
void ViewProviderGeometryObject::dragStartCallback(void *, SoDragger *)
|
||||
{
|
||||
// This is called when a manipulator is about to manipulating
|
||||
Gui::Application::Instance->activeDocument()->openCommand("Transform");
|
||||
|
|
|
@ -258,7 +258,7 @@ int PointMarker::countPoints() const
|
|||
return vp->pCoords->point.getNum();
|
||||
}
|
||||
|
||||
void PointMarker::customEvent(QEvent* e)
|
||||
void PointMarker::customEvent(QEvent*)
|
||||
{
|
||||
Gui::Document* doc = Gui::Application::Instance->activeDocument();
|
||||
doc->openCommand("Measure distance");
|
||||
|
|
|
@ -157,12 +157,12 @@ PyObject* ViewProviderPy::setTransformation(PyObject *args)
|
|||
return 0;
|
||||
}
|
||||
|
||||
PyObject *ViewProviderPy::getCustomAttributes(const char* attr) const
|
||||
PyObject *ViewProviderPy::getCustomAttributes(const char*) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ViewProviderPy::setCustomAttributes(const char* attr, PyObject *obj)
|
||||
int ViewProviderPy::setCustomAttributes(const char*, PyObject *)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ Py::Object ViewProviderPy::getAnnotation(void) const
|
|||
}
|
||||
}
|
||||
|
||||
void ViewProviderPy::setAnnotation(Py::Object arg)
|
||||
void ViewProviderPy::setAnnotation(Py::Object)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ Py::Object ViewProviderPy::getRootNode(void) const
|
|||
}
|
||||
}
|
||||
|
||||
void ViewProviderPy::setRootNode(Py::Object arg)
|
||||
void ViewProviderPy::setRootNode(Py::Object)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -407,7 +407,7 @@ SoDetail* ViewProviderPythonFeatureImp::getDetail(const char* name) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
std::vector<Base::Vector3d> ViewProviderPythonFeatureImp::getSelectionShape(const char* Element) const
|
||||
std::vector<Base::Vector3d> ViewProviderPythonFeatureImp::getSelectionShape(const char* /*Element*/) const
|
||||
{
|
||||
return std::vector<Base::Vector3d>();
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ Action * StdCmdDescription::createAction(void)
|
|||
|
||||
void StdCmdDescription::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
if ( !inDescriptionMode() )
|
||||
enterDescriptionMode();
|
||||
else
|
||||
|
|
|
@ -560,7 +560,7 @@ QWidget* UiLoader::createWidget(const QString & className, QWidget * parent,
|
|||
|
||||
// ----------------------------------------------------
|
||||
|
||||
PyObject *UiLoaderPy::PyMake(struct _typeobject *type, PyObject * args, PyObject * kwds)
|
||||
PyObject *UiLoaderPy::PyMake(struct _typeobject */*type*/, PyObject * args, PyObject * /*kwds*/)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return 0;
|
||||
|
@ -1167,7 +1167,7 @@ Py::Object PyResource::setValue(const Py::Tuple& args)
|
|||
/**
|
||||
* If any resouce has been loaded this methods shows it as a modal dialog.
|
||||
*/
|
||||
Py::Object PyResource::show(const Py::Tuple& args)
|
||||
Py::Object PyResource::show(const Py::Tuple&)
|
||||
{
|
||||
if (myDlg) {
|
||||
// small trick to get focus
|
||||
|
|
|
@ -70,8 +70,9 @@ CommandIconView::~CommandIconView ()
|
|||
/**
|
||||
* Stores the name of the selected commands for drag and drop.
|
||||
*/
|
||||
void CommandIconView::startDrag ( Qt::DropActions supportedActions )
|
||||
void CommandIconView::startDrag (Qt::DropActions supportedActions)
|
||||
{
|
||||
Q_UNUSED(supportedActions);
|
||||
QList<QListWidgetItem*> items = selectedItems();
|
||||
QByteArray itemData;
|
||||
QDataStream dataStream(&itemData, QIODevice::WriteOnly);
|
||||
|
@ -284,6 +285,7 @@ void ActionSelector::onCurrentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)
|
|||
|
||||
void ActionSelector::onItemDoubleClicked(QTreeWidgetItem * item, int column)
|
||||
{
|
||||
Q_UNUSED(column);
|
||||
QTreeWidget* treeWidget = item->treeWidget();
|
||||
if (treeWidget == availableWidget) {
|
||||
int index = availableWidget->indexOfTopLevelItem(item);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <qglobal.h>
|
||||
#include "Window.h"
|
||||
|
||||
#include <Base/Console.h>
|
||||
|
@ -72,6 +73,8 @@ bool WindowParameter::setGroupName(const char* name)
|
|||
|
||||
void WindowParameter::OnChange(Base::Subject<const char*> &rCaller, const char * sReason)
|
||||
{
|
||||
Q_UNUSED(rCaller);
|
||||
Q_UNUSED(sReason);
|
||||
Base::Console().Log("Parameter has changed and window (%s) has not overridden this function!",_handle->GetGroupName());
|
||||
}
|
||||
|
||||
|
|
|
@ -332,6 +332,8 @@ void Workbench::setupCustomShortcuts() const
|
|||
|
||||
void Workbench::setupContextMenu(const char* recipient,MenuItem* item) const
|
||||
{
|
||||
Q_UNUSED(recipient);
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
void Workbench::createMainWindowPopupMenu(MenuItem*) const
|
||||
|
@ -688,6 +690,8 @@ void BlankWorkbench::deactivated()
|
|||
|
||||
void BlankWorkbench::setupContextMenu(const char* recipient,MenuItem* item) const
|
||||
{
|
||||
Q_UNUSED(recipient);
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
MenuItem* BlankWorkbench::setupMenuBar() const
|
||||
|
@ -725,6 +729,8 @@ NoneWorkbench::~NoneWorkbench()
|
|||
|
||||
void NoneWorkbench::setupContextMenu(const char* recipient,MenuItem* item) const
|
||||
{
|
||||
Q_UNUSED(recipient);
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
MenuItem* NoneWorkbench::setupMenuBar() const
|
||||
|
@ -881,6 +887,7 @@ DockWindowItems* PythonBaseWorkbench::setupDockWindows() const
|
|||
|
||||
void PythonBaseWorkbench::setupContextMenu(const char* recipient, MenuItem* item) const
|
||||
{
|
||||
Q_UNUSED(recipient);
|
||||
QList<MenuItem*> items = _contextMenu->getItems();
|
||||
for (QList<MenuItem*>::Iterator it = items.begin(); it != items.end(); ++it) {
|
||||
item->appendItem((*it)->copy());
|
||||
|
|
|
@ -51,6 +51,9 @@ std::string WorkbenchPy::representation(void) const
|
|||
/** Retrieves the workbench name */
|
||||
PyObject* WorkbenchPy::name(PyObject *args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C
|
||||
return NULL; // NULL triggers exception
|
||||
|
||||
PY_TRY {
|
||||
std::string name = getWorkbenchPtr()->name();
|
||||
PyObject* pyName = PyString_FromString(name.c_str());
|
||||
|
@ -61,6 +64,9 @@ PyObject* WorkbenchPy::name(PyObject *args)
|
|||
/** Activates the workbench object */
|
||||
PyObject* WorkbenchPy::activate(PyObject *args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C
|
||||
return NULL; // NULL triggers exception
|
||||
|
||||
PY_TRY {
|
||||
std::string name = getWorkbenchPtr()->name();
|
||||
WorkbenchManager::instance()->activate( name, getWorkbenchPtr()->getTypeId().getName() );
|
||||
|
@ -68,12 +74,12 @@ PyObject* WorkbenchPy::activate(PyObject *args)
|
|||
}PY_CATCH;
|
||||
}
|
||||
|
||||
PyObject *WorkbenchPy::getCustomAttributes(const char* attr) const
|
||||
PyObject *WorkbenchPy::getCustomAttributes(const char*) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int WorkbenchPy::setCustomAttributes(const char* attr, PyObject *obj)
|
||||
int WorkbenchPy::setCustomAttributes(const char*, PyObject *)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user