Commit 897bd129 authored by Sylvain Thery's avatar Sylvain Thery

doc...

parent 02a67915
......@@ -29,30 +29,66 @@ public:
~Camera();
const QString& getName() const { return m_name; }
// const glm::mat4& getTransfoMatrix() const;
public slots:
/**
* @brief get the name
* @return name
*/
QString getName();
SCHNApps* getSCHNApps() const;
/**
* @brief test if camera is used by one view
* @return used / not used
*/
bool isUsed() const;
/**
* @brief test is camera is used by several view
* @return shared / not shared (by view)
*/
bool isShared() const;
qglviewer::Camera::Type getProjectionType();
/// drawing of camera (do not use)
bool getDraw() const;
bool getDrawPath() const;
const QList<View*>& getLinkedViews() const;
bool isLinkedToView(View* view) const;
/**
* @briefset the projection type
* @param t 0:perspective / 1::orthogonal
*/
void setProjectionType(int t);
/// drawing of camera (do not use)
void setDraw(bool b);
void setDrawPath(bool b);
/**
* @brief Enable the camera to update automatically with view bounding box
*/
void enableViewsBoundingBoxFitting();
/**
* @brief Enable the camera to update automatically with view bounding box
*/
void disableViewsBoundingBoxFitting();
/**
* @brief store position and rotationof camera into a string
* @return the storage string
*/
QString toString();
/**
* @brief restore a camera from string storage
* @param cam the string containing data
*/
void fromString(QString cam);
private:
......
......@@ -43,9 +43,20 @@ public:
inline const QString& getName() const { return m_name; }
public slots:
/**
* @brief get the name
* @return name
*/
QString getName();
SCHNApps* getSCHNApps() const;
/**
* @brief test is map is the current selected map
* @return selected / not selected
*/
bool isSelectedMap() const;
GenericMap* getGenericMap() const;
/*********************************************************
......@@ -65,16 +76,35 @@ private slots:
public slots:
/**
* @brief Fix if bounding box has to be drawn
* @param b yes or not
*/
void showBB(bool b);
/**
* @brief is bounding-box of map drawn
* @return is bounding-box of map drawn
*/
bool isBBshown() const;
/**
* @brief choose the vertex attribute used to compute the bounding-box
* @param name name of attribute
*/
void setBBVertexAttribute(const QString& name);
AttributeMultiVectorGen* getBBVertexAttribute() const;
/**
* @brief get the vertex attribute used to compute the bounding-box
* @return name of attribute
*/
QString getBBVertexAttributeName() const;
/**
* @brief get the length of diagonal of bounding-box of map
*/
float getBBdiagSize() const;
Utils::Drawer* getBBDrawer() const;
......@@ -124,15 +154,33 @@ public:
public slots:
Utils::VBO* createVBO(const AttributeMultiVectorGen* attr);
Utils::VBO* createVBO(const AttributeHandlerGen& attr);
/**
* @brief create a VBO from vertex attribute (with same name)
* @param name name of attribute
*/
Utils::VBO* createVBO(const QString& name);
void updateVBO(const AttributeMultiVectorGen* attr);
void updateVBO(const AttributeHandlerGen& attr);
/**
* @brief update VBO from attribute data
* @param name name of VBO (and corresponding attribute)
*/
void updateVBO(const QString& name);
/**
* @brief Get VBO object from its name
* @param name of VBO
*/
Utils::VBO* getVBO(const QString& name) const;
const VBOSet& getVBOSet() const { return m_vbo; }
/**
* @brief Delete a VBO
* @param name name of VBO
*/
void deleteVBO(const QString& name);
/*********************************************************
......@@ -158,7 +206,16 @@ public:
*********************************************************/
private:
/**
* @brief link a view to the map
* @param view
*/
void linkView(View* view);
/**
* @brief unlink a view from the map
* @param view
*/
void unlinkView(View* view);
public slots:
......@@ -186,6 +243,12 @@ public:
inline const glm::mat4& getInverseTransfoMatrix() const { return m_transfoMatrixInv; }
public slots:
/**
* @brief Set the scaling that apply on rendering the map
* @param sx scaling x factor
* @param sy scaling y factor
* @param sz scaling z factor
*/
void setScaling(float sx, float sy, float sz);
......
......@@ -36,6 +36,10 @@ public:
~SCHNApps();
public slots:
/**
* @brief get the file path where application has been launched
* @return the path
*/
const QString& getAppPath() { return m_appPath; }
/*********************************************************
......@@ -43,10 +47,23 @@ public slots:
*********************************************************/
public slots:
/**
* @brief add a camera with a given name
* @param name name of camera
*/
Camera* addCamera(const QString& name);
Camera* addCamera();
/**
* @brief remove a camera
* @param name name of camera to remove
*/
void removeCamera(const QString& name);
/**
* @brief get camera object
* @param name of camera
*/
Camera* getCamera(const QString& name) const;
const CameraSet& getCameraSet() const { return m_cameras; }
......@@ -58,20 +75,64 @@ public:
public slots:
/**
* @brief add a view with name
* @param name name of view
*/
View* addView(const QString& name);
/**
* @brief add a view
*/
View* addView();
/**
* @brief remove a view
* @param name the name of the view
*/
void removeView(const QString& name);
/**
* @brief get view object
* @param name the name of view
*/
View* getView(const QString& name) const;
const ViewSet& getViewSet() const { return m_views; }
/**
* @brief get the selected view
*/
View* getSelectedView() const { return m_selectedView; }
/**
* @brief set the selected view
* @param view the view object
*/
void setSelectedView(View* view);
/**
* @brief set the selected view
* @param name the view name
*/
void setSelectedView(const QString& name);
/**
* @brief split the view in the current orientation
* @param orientation of split 0: Vertical Split 1:
* @return the new View added by the split
*/
View* splitView(const QString& name, Qt::Orientation orientation);
/**
* @brief save all split positions in a string
* @return the storage string
*/
QString saveSplitViewPositions();
/**
* @brief restore all split positions from a string storage,
* the split's sequence must the same than when saving
*/
void restoreSplitViewPositions(QString stringStates);
......@@ -80,11 +141,28 @@ public slots:
*********************************************************/
public slots:
/**
* @brief Add a directory for searching available plugin
* @param path path od directory
*/
void registerPluginsDirectory(const QString& path);
/**
* @brief Load and enable a plugin
* @param pluginName plugin name
*/
Plugin* enablePlugin(const QString& pluginName);
/**
* @brief Disable and unload a plugin
* @param pluginName plugin name
*/
void disablePlugin(const QString& pluginName);
/**
* @brief Get plugin object from name
* @param name name of plugin
*/
Plugin* getPlugin(const QString& name) const;
const PluginSet& getPluginSet() const { return m_plugins; }
......@@ -103,23 +181,65 @@ private slots:
*********************************************************/
public slots:
/**
* @brief add a new empty map
* @param name name given to the map
* @param dim dimension of the map
*/
MapHandlerGen* addMap(const QString& name, unsigned int dim);
/**
* @brief Remove a map
* @param name name of map
*/
void removeMap(const QString& name);
MapHandlerGen* duplicateMap(const QString& name, bool properties);
/**
* @brief Duplicated (copy) a map
* @param name of map to copy
* @param properties copy BB & VBO
*/
MapHandlerGen* duplicateMap(const QString& name, bool properties);
/**
* @brief Set the current selected map
* @param mapName name of the map to be selected
*/
void setSelectedMap(const QString& mapName);
/**
* @brief Get a map object from its name
* @param name name of map
*/
MapHandlerGen* getMap(const QString& name) const;
const MapSet& getMapSet() const { return m_maps; }
void notifySelectedMapChanged(MapHandlerGen* old, MapHandlerGen* cur) { DEBUG_EMIT("selectedMapChanged"); emit(selectedMapChanged(old, cur)); }
/**
* @brief Get the current selected map
* @return the selected map
*/
MapHandlerGen* getSelectedMap() const;
/**
* @brief Get the current selected tab orbit in interface
* @return 0:Dart / 1:Vertex / 2:Edge / 3:Face / 4:Volume
*/
unsigned int getCurrentOrbit() const;
void notifySelectedCellSelectorChanged(CellSelectorGen* cs) { DEBUG_EMIT("selectedCellSelectorChanged"); emit(selectedCellSelectorChanged(cs)); }
/**
* @brief Get cell selector
* @param orbit Orbit (0:Dart / 1:Vertex / 2:Edge / 3:Face / 4:Volume)
*/
CellSelectorGen* getSelectedSelector(unsigned int orbit) const;
/**
* @brief Set the selector of the current map (warning change the current orbit)
* @param orbit the orbit (0:Dart / 1:Vertex / 2:Edge / 3:Face / 4:Volume)
* @param name name of selector (must exist)
*/
void setSelectedSelectorCurrentMap(unsigned int orbit, const QString& name);
const StaticPointers& getStaticPointers() const { return m_sp; }
......@@ -151,6 +271,10 @@ public slots:
void showHidePluginDock();
void showHidePythonDock();
/**
* @brief Load a python script store in a file.
* @param fileName the filename
*/
void loadPythonScriptFromFile(const QString& fileName);
/**
......@@ -160,14 +284,28 @@ public slots:
*/
void setPythonShortcut(const QString& keys, const QString& command);
/**
* @brief Print a message in the status bar
* @param msg the message
* @param msec number of milli-second that message stay printed
*/
void statusBarMessage(const QString& msg, int msec);
QString openFileDialog(const QString& title, const QString& dir = QString(), const QString& filter = QString());
QString saveFileDialog(const QString& title, const QString& dir = QString(), const QString& filter = QString());
/**
* @brief Fix the window size
* @param w width of window
* @param h height of window
*/
inline void setWindowSize(int w, int h) { this->resize(w, h); }
/**
* @brief set the default path used when opening python file dialog.
* @param path the default path
*/
inline void setPythonPath(const QString& path) { m_pyPathFile = path; }
private slots:
......
......@@ -46,34 +46,87 @@ public:
void hideDialogs();
public slots:
/**
* @brief get the name
* @return name
*/
QString getName() { return m_name; }
SCHNApps* getSCHNApps() const { return m_schnapps; }
/**
* @brief test if the view is the selected one
* @return
*/
bool isSelectedView() const { return m_schnapps->getSelectedView() == this; }
void setCurrentCamera(Camera* c);
/**
* set the current camera of the view
* @param name the name of camera
*/
void setCurrentCamera(const QString& name);
/**
* get the current camera of the view
* @return the camera object
*/
Camera* getCurrentCamera() const { return m_currentCamera; }
bool usesCamera(Camera* c) const { return m_currentCamera == c; }
/**
* test if a camera is the current camera
* @param name the name of camera
*/
bool usesCamera(const QString& name) const;
void linkPlugin(PluginInteraction* plugin);
/**
* link a plugin with the view
* @param name the name of plugin
*/
void linkPlugin(const QString& name);
void unlinkPlugin(PluginInteraction* plugin);
/**
* unlink a plugin of the view
* @param name the name of plugin
*/
void unlinkPlugin(const QString& name);
const QList<PluginInteraction*>& getLinkedPlugins() const { return l_plugins; }
bool isLinkedToPlugin(PluginInteraction* plugin) const { return l_plugins.contains(plugin); }
/**
* test if the view is linked to a plugin
* @param name the name of plugin
*/
bool isLinkedToPlugin(const QString& name) const;
void linkMap(MapHandlerGen* map);
/**
* link a map with the view
* @param name the name of map
*/
void linkMap(const QString& name);
void unlinkMap(MapHandlerGen* map);
/**
* unlink a map of the view
* @param name the name of map
*/
void unlinkMap(const QString& name);
const QList<MapHandlerGen*>& getLinkedMaps() const { return l_maps; }
bool isLinkedToMap(MapHandlerGen* map) const { return l_maps.contains(map); }
/**
* test if the view is linked to a lao
* @param name the name of map
*/
bool isLinkedToMap(const QString& name) const;
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment