AddAtomArg(I,Type,"char","Char",Result,CurrPos);
}
+void AddCharArrayArg(int I, ValueInfo* Type, char *Result, int *CurrPos) {
+ AddArrayArg(I,Type,"char",Result,CurrPos);
+}
+
void AddStringArg(int I, char *Result, int *CurrPos) {
#if defined(IDL_I_HH) || defined(IDL_I_CC)
add_to_sig(Result,"char ",CurrPos);
int IsShort(ValueInfo* theType) {
//return ((Type % 0x10) == 0x4 || (Type % 0x10) == 0x5 || (Type % 0x10) == 0xA);
int aVal = theType->Type & VTK_PARSE_BASE_TYPE;
- return (aVal == VTK_PARSE_SHORT) || (aVal == VTK_PARSE_INT) ||
- (aVal == VTK_PARSE_ID_TYPE) || (aVal == VTK_PARSE_UNSIGNED_INT) || (aVal == VTK_PARSE_UNSIGNED_SHORT) ||
+ return (aVal == VTK_PARSE_SHORT) || (aVal == VTK_PARSE_UNSIGNED_SHORT);
+}
+
+int IsInt(ValueInfo* theType) {
+ //return ((Type % 0x10) == 0x4 || (Type % 0x10) == 0x5 || (Type % 0x10) == 0xA);
+ int aVal = theType->Type & VTK_PARSE_BASE_TYPE;
+ return (aVal == VTK_PARSE_INT) ||
+ (aVal == VTK_PARSE_ID_TYPE) || (aVal == VTK_PARSE_UNSIGNED_INT) ||
(aVal == VTK_PARSE_SSIZE_T) || (aVal == VTK_PARSE_SIZE_T);
}
+int IsShortInt(ValueInfo* theType) {
+ //return ((Type % 0x10) == 0x4 || (Type % 0x10) == 0x5 || (Type % 0x10) == 0xA);
+ return (IsShort(theType) || IsInt(theType));
+}
+
void AddShortAtomArg(int I, ValueInfo* Type, char *Result, int *CurrPos) {
AddAtomArg(I,Type,"short","Short",Result,CurrPos);
}
return (IsShort(Type) && IsArray(Type));
}
+int IsIntArray(ValueInfo* Type) {
+ return (IsInt(Type) && IsArray(Type));
+}
+
void AddShortArrayArg(int I, ValueInfo* Type, char *Result, int *CurrPos) {
AddArrayArg(I,Type,"short",Result,CurrPos);
}
}
void AddTypeArray(ValueInfo* Type, char *Result, int *CurrPos) {
- if(IsShort(Type))
+ if(IsShortInt(Type))
add_to_sig(Result,"short",CurrPos);
if(IsLong(Type))
add_to_sig(Result,"long",CurrPos);
}
}
- if(IsShort(aType)) {
+ if(IsShortInt(aType)) {
if(IsArray(aType)) {
if (IsUnsigned(aType))
add_to_sig(result,"unsigned ",currPos);
add_to_sig(result,"char",currPos);
}
} else if(IsChar(aType)) {
- add_to_sig(result,"CORBA::Char",currPos);
+ if(IsArray(aType)) {
+ if (IsUnsigned(aType))
+ add_to_sig(result,"unsigned ",currPos);
+ add_to_sig(result,"char",currPos);
+ } else {
+ add_to_sig(result,"CORBA::Char",currPos);
+ }
}
if(IsBoolean(aType)) {
}
}
- if(IsShort(aType)) {
- if(IsShortArray(aType)) {
+ if(IsShortInt(aType)) {
+ if(IsArray(aType)) {
AddShortArrayArg(i,aType,result,currPos);
} else {
AddShortAtomArg(i,aType,result,currPos);
if(IsString(aType)) {
AddStringArg(i,result,currPos);
} else {
- AddCharAtomArg(i,aType,result,currPos);
+ if(IsCharArray(aType)) {
+ AddCharArrayArg(i,aType,result,currPos);
+ } else {
+ AddCharAtomArg(i,aType,result,currPos);
+ }
}
} else if (IsString(aType)) //!!! VSV
AddStringArg(i,result,currPos);
if(IsClass(aArgVal) && IsPtr(aArgVal)) {
add_to_sig(result,"*",&currPos);
}
- if (IsString(aArgVal) && IsConst(aArgVal))
+ if (IsString(aArgVal) && IsConst(aArgVal) && strcmp(aArgVal->Class, "vtkStdString") != 0)
sprintf(buf,"checkNullStr(myParam%d)",i);
else
sprintf(buf,"myParam%d",i);
if(IsDouble(aArgVal))
add_to_sig(result,"double",&currPos);
+ if(IsChar(aArgVal)) {
+ if (IsUnsigned(aArgVal))
+ add_to_sig(result,"unsigned ",&currPos);
+ add_to_sig(result,"char",&currPos);
+ }
+
if(IsvtkIdType(aArgVal)) {
if (IsUnsigned(aArgVal))
add_to_sig(result,"unsigned ",&currPos);
add_to_sig(result,"vtkIdType",&currPos);
} else {
- if(IsShort(aArgVal)) {
+ if(IsShortInt(aArgVal)) {
if (IsUnsigned(aArgVal))
add_to_sig(result,"unsigned ",&currPos);
add_to_sig(result,"int",&currPos);
if(IsDouble(aArgVal))
add_to_sig(result,"double",&currPos);
+ if(IsChar(aArgVal)) {
+ if (IsUnsigned(aArgVal))
+ add_to_sig(result,"unsigned ",&currPos);
+ add_to_sig(result,"char",&currPos);
+ }
+
if(IsvtkIdType(aArgVal)) {
if (IsUnsigned(aArgVal))
add_to_sig(result,"unsigned ",&currPos);
add_to_sig(result,"vtkIdType",&currPos);
} else {
- if(IsShort(aArgVal)) {
+ if(IsShortInt(aArgVal)) {
if (IsUnsigned(aArgVal))
add_to_sig(result,"unsigned ",&currPos);
add_to_sig(result,"int",&currPos);
}
}
- if(IsShort(aRetVal)) {
+ if(IsShortInt(aRetVal)) {
if(IsArray(aRetVal)) {
if(IsvtkIdType(aRetVal)) {
add_to_sig(result,"vtkIdType",&currPos);
} else {
- add_to_sig(result,"int",&currPos);
+ if(IsShort(aRetVal)) {
+ add_to_sig(result,"short",&currPos);
+ } else {
+ add_to_sig(result,"int",&currPos);
+ }
}
add_to_sig(result,"* a_ret = ",&currPos);
} else {
pvCreateToolBars();
pvCreateMenus();
+ QList<QDockWidget*> activeDocks = aDesktop->findChildren<QDockWidget*>();
+ QList<QMenu*> activeMenus = aDesktop->findChildren<QMenu*>();
+
// new pqParaViewBehaviors(anApp->desktop(), this);
// Has to be replaced in order to exclude using of pqQtMessageHandlerBehaviour
// Start pqParaViewBehaviors
pqApplicationCore::instance(), SLOT(quickLaunch()));
// End pqParaViewBehaviors
+ // Find Plugin Dock Widgets
+ QList<QDockWidget*> currentDocks = aDesktop->findChildren<QDockWidget*>();
+ QList<QDockWidget*>::iterator i;
+ for (i = currentDocks.begin(); i != currentDocks.end(); ++i) {
+ if(!activeDocks.contains(*i)) {
+ myDockWidgets[*i] = false; // hidden by default
+ (*i)->hide();
+ }
+ }
+
+ // Find Plugin Menus
+ QList<QMenu*> currentMenus = aDesktop->findChildren<QMenu*>();
+ QList<QMenu*>::iterator im;
+ for (im = currentMenus.begin(); im != currentMenus.end(); ++im) {
+ if(!activeMenus.contains(*im)) {
+ myMenus.append(*im);
+ }
+ }
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
QString aPath = resMgr->stringValue("resources", "PARAVIS", QString());
restoreDockWidgetsState();
- QMenu* aMenu = menuMgr()->findMenu( myRecentMenuId );
- if(aMenu) {
- QList<QAction*> anActns = aMenu->actions();
- for (int i = 0; i < anActns.size(); ++i) {
- QAction* a = anActns.at(i);
- if(a)
- a->setVisible(true);
- }
+ QMenu* aMenu = menuMgr()->findMenu( myRecentMenuId );
+ if(aMenu) {
+ QList<QAction*> anActns = aMenu->actions();
+ for (int i = 0; i < anActns.size(); ++i) {
+ QAction* a = anActns.at(i);
+ if(a)
+ a->setVisible(true);
}
+ }
+
+ QList<QMenu*>::iterator it;
+ for (it = myMenus.begin(); it != myMenus.end(); ++it) {
+ QAction* a = (*it)->menuAction();
+ if(a)
+ a->setVisible(true);
+ }
if ( myRecentMenuId != -1 ) menuMgr()->show(myRecentMenuId);
*/
bool PVGUI_Module::deactivateModule( SUIT_Study* study )
{
- QMenu* aMenu = menuMgr()->findMenu( myRecentMenuId );
- if(aMenu) {
- QList<QAction*> anActns = aMenu->actions();
- for (int i = 0; i < anActns.size(); ++i) {
- QAction* a = anActns.at(i);
- if(a)
- a->setVisible(false);
- }
+ QMenu* aMenu = menuMgr()->findMenu( myRecentMenuId );
+ if(aMenu) {
+ QList<QAction*> anActns = aMenu->actions();
+ for (int i = 0; i < anActns.size(); ++i) {
+ QAction* a = anActns.at(i);
+ if(a)
+ a->setVisible(false);
}
+ }
+
+ QList<QMenu*>::iterator it;
+ for (it = myMenus.begin(); it != myMenus.end(); ++it) {
+ QAction* a = (*it)->menuAction();
+ if(a)
+ a->setVisible(false);
+ }
QList<QDockWidget*> aStreamingViews = application()->desktop()->findChildren<QDockWidget*>("pqStreamingControls");
foreach(QDockWidget* aView, aStreamingViews) {