Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated copyright message
[modules/gui.git]
/
src
/
LightApp
/
LightApp_ModuleAction.h
diff --git
a/src/LightApp/LightApp_ModuleAction.h
b/src/LightApp/LightApp_ModuleAction.h
old mode 100755
(executable)
new mode 100644
(file)
index
b552b7a
..
62dfcd9
--- a/
src/LightApp/LightApp_ModuleAction.h
+++ b/
src/LightApp/LightApp_ModuleAction.h
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-20
23 CEA, EDF
, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-32,6
+32,8
@@
#endif
class QtxComboBox;
#endif
class QtxComboBox;
+class QtxResourceMgr;
+class QSignalMapper;
class LIGHTAPP_EXPORT LightApp_ModuleAction : public QtxAction
{
class LIGHTAPP_EXPORT LightApp_ModuleAction : public QtxAction
{
@@
-43,26
+45,40
@@
private:
class ActivateEvent;
public:
class ActivateEvent;
public:
- enum { None = 0x00, Buttons = 0x01, ComboItem = 0x02, All = Buttons | ComboItem };
+ typedef enum { Buttons = 0x01,
+ List = 0x02,
+ AddRemove = 0x04,
+ All = Buttons | List | AddRemove
+ } Mode;
public:
public:
- LightApp_ModuleAction( const QString&, QObject* = 0 );
- LightApp_ModuleAction( const QString&, const QIcon&, QObject* = 0 );
+ LightApp_ModuleAction( QtxResourceMgr*, QObject* = 0 );
virtual ~LightApp_ModuleAction();
virtual ~LightApp_ModuleAction();
+ int count() const;
QStringList modules() const;
QIcon moduleIcon( const QString& ) const;
void setModuleIcon( const QString&, const QIcon& );
QStringList modules() const;
QIcon moduleIcon( const QString& ) const;
void setModuleIcon( const QString&, const QIcon& );
+ QAction* moduleAction( const QString& ) const;
+
void insertModule( const QString&, const QIcon&, const int = -1 );
void insertModule( const QString&, const QIcon&, const int = -1 );
+ void insertModule( const QString&, const QIcon&, bool, const int = -1 );
void removeModule( const QString& );
void removeModule( const QString& );
+ void insertExtension(const QString&);
+ void removeExtension(const QString&);
+ void updateExtActions();
QString activeModule() const;
QString activeModule() const;
+
+ void setMode( const Mode& );
+ void setModeEnabled( const Mode&, bool );
+ bool isModeEnabled( const Mode& ) const;
+
+public slots:
void setActiveModule( const QString& );
void setActiveModule( const QString& );
- void setMode( const int );
- int mode() const;
protected:
virtual void addedTo( QWidget* );
protected:
virtual void addedTo( QWidget* );
@@
-72,10
+88,11
@@
protected:
signals:
void moduleActivated( const QString& );
signals:
void moduleActivated( const QString& );
+ void adding();
+ void removing( const QString& );
+ void showExtInfo();
private:
private:
- void init();
-
void update();
void update( QtxComboBox* );
void update();
void update( QtxComboBox* );
@@
-89,8
+106,13
@@
private slots:
private:
ComboAction* myCombo;
private:
ComboAction* myCombo;
+ QtxAction* myAdd;
+ QtxAction* myRemove;
+ QtxAction* myInfo;
ActionSet* mySet;
ActionSet* mySet;
+ QAction* mySeparator;
int myMode;
int myMode;
+ QSignalMapper* myMapper;
};
class LightApp_ModuleAction::ComboAction : public QtxAction
};
class LightApp_ModuleAction::ComboAction : public QtxAction