Commit bb1f2806 authored by Jule Marcoueille's avatar Jule Marcoueille

- Modification de la fenetre principale pour y ajouter une barre de

scroll verticale
- Modification d'ordre esthétique de la fenêtre d'export svg ('wide' ne 
traduit pas la bonne idée il faudra changer par 'width factor' ou 
quelque chose du genre)
- Ajout des fonctions de scroll vertical (non-fonctionnelles encore)
- Correction d'anglais : 'ruler' et non pas 'rule'
- Ajout du dossier render au Doxyfile pour générer la doc
parent 21cc2e3b
......@@ -513,7 +513,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = src/interface/ src/message/ src/parser/ src/trace/ src/trace/values/ src/main.cpp src/main_resource.hpp tests/interface tests/message tests/parser tests/trace
INPUT = src/interface/ src/message/ src/parser/ src/render/ src/trace/ src/trace/values/ src/main.cpp src/main_resource.hpp tests/interface tests/message tests/parser tests/trace
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
......
......@@ -490,7 +490,7 @@ void Interface_console::launch_action(int state, void* arg){
case _STATE_RENDER_AREA_CHANGE_TRANSLATE:
_render_opengl->change_translate( *((int*)arg) );
break;
case _STATE_RENDER_AREA_CHANGE_SCALE:
_render_opengl->change_scale( *((Element_pos*)arg) );
break;
......@@ -507,6 +507,10 @@ void Interface_console::launch_action(int state, void* arg){
_render_opengl->replace_translate( *((Element_pos*)arg) );
break;
case _STATE_RENDER_AREA_REPLACE_TRANSLATE_Y:
_render_opengl->replace_translate_y( *((Element_pos*)arg) );
break;
default:/* like _STATE_UNKNOWN */
display_help();
warning(string("Cannot determine the arguments past. Please check the correct syntax."));
......
......@@ -119,6 +119,11 @@ public:
*\brief A state which corresponds to replace the render area translate.
*/
static const int _STATE_RENDER_AREA_REPLACE_TRANSLATE = 14;
/*!
*\brief A state which corresponds to replace the render area translate.
*/
static const int _STATE_RENDER_AREA_REPLACE_TRANSLATE_Y = 15;
/*!
* \brief Launch an action according to the argument state value.
......
......@@ -86,7 +86,8 @@ void Interface_graphic::load_windows(){
CKFP(_ui_toolbar_check = qFindChild<QAction*>(this, "toolbar_menu"), "Cannot find the tool bar checker in the .ui file");
CKFP(_ui_toolbar = qFindChild<QToolBar*>(this, "toolBar"), "Cannot find the tool bar in the .ui file");
CKFP(_ui_x_scroll = qFindChild<QScrollBar*>(this, "x_scroll"), "Cannot find the horizontal scroll bar in the .ui file");
CKFP(_ui_x_scroll = qFindChild<QScrollBar*>(this, "x_scroll"), "Cannot find the horizontal scroll bar in the .ui file");
CKFP(_ui_y_scroll = qFindChild<QScrollBar*>(this, "y_scroll"), "Cannot find the vertical scroll bar in the .ui file");
......@@ -437,6 +438,11 @@ void Interface_graphic::on_x_scroll_valueChanged(int new_value){
_core->launch_action(Interface_console::_STATE_RENDER_AREA_REPLACE_TRANSLATE, &new_value);
}
void Interface_graphic::on_y_scroll_valueChanged(int new_value){
_core->launch_action(Interface_console::_STATE_RENDER_AREA_REPLACE_TRANSLATE_Y, &new_value);
}
void Interface_graphic::on_scale_container_state_valueChanged(int new_value){
_core->launch_action(Interface_console::_STATE_RENDER_AREA_CHANGE_CONTAINER_SCALE, &new_value);
......
......@@ -84,6 +84,11 @@ class Interface_graphic : public QMainWindow, protected Ui::main_window, public
*/
QScrollBar* _ui_x_scroll;
/*!
* \brief This variable contains the instance of the vertical scroll bar.
*/
QScrollBar* _ui_y_scroll;
/*!
* \brief Contains the Interface_console parent instance.
*/
......@@ -328,6 +333,12 @@ protected slots:
*/
void on_x_scroll_valueChanged(int new_value);/* temporary slot */
/*!
* \brief Change the y position of camera view for state drawing area.
* \param new_value The new position.
*/
void on_y_scroll_valueChanged(int new_value);/* temporary slot */
/*!
* \brief Change the percentage taken by container display in the render area.
* \param new_value The new percentage (between 0 to 100).
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -367,9 +367,9 @@ class Render_opengl : public QGLWidget, public Render
Element_pos _state_y_min;
/*!
* \brief z position for the rule.
* \brief z position for the ruler.
*/
Element_pos _z_rule;
Element_pos _z_ruler;
/*!
* \brief z position for containers.
......@@ -402,19 +402,19 @@ class Render_opengl : public QGLWidget, public Render
Element_pos _default_entity_x_translate;
/*!
* Distance between to rule measures.
* Distance between to ruler measures.
*/
Element_pos _rule_distance;
Element_pos _ruler_distance;
/*!
* Height of the rule.
* Height of the ruler.
*/
Element_pos _rule_height;
Element_pos _ruler_height;
/*!
* highness of the rule.
* highness of the ruler.
*/
Element_pos _rule_y;
Element_pos _ruler_y;
/***********************************
* Trace Drawing functions and attributes.
......@@ -508,11 +508,17 @@ class Render_opengl : public QGLWidget, public Render
void change_translate(int translate);/* temporary -> to change the translate to view states */
/*!
* \brief Replace the current tranlate by a new translate.
* \brief Replace the current x translate by a new translate.
* \param new_translate The new translate value to replace the current translate.
*/
void replace_translate(Element_pos new_translate);
/*!
* \brief Replace the current y translate by a new translate.
* \param new_translate The new translate value to replace the current translate.
*/
void replace_translate_y(Element_pos new_translate);
/*!
* \brief Change the percentage taken by container display in the render area.
* \param view_size The new percentage (between 0 to 100).
......@@ -644,9 +650,9 @@ class Render_opengl : public QGLWidget, public Render
void end_draw();
/*!
* \brief Create the rule disaply list.
* \brief Create the ruler disaply list.
*/
void create_rule();
void create_ruler();
/*!
......@@ -847,7 +853,7 @@ inline void Render_opengl::draw_stored_arrows(std::vector<Arrow_> &arrows){
/* Manage the event drawing size from state size and render area dimensions */
Element_pos arrow_scale_x = _state_scale*((_render_width-_default_entity_x_translate)/(_state_x_max-_state_x_min));
Element_pos arrow_scale_y = _y_state_scale*(_render_height-_rule_height)/_container_y_max;
Element_pos arrow_scale_y = _y_state_scale*(_render_height-_ruler_height)/_container_y_max;
Element_pos angle;
......@@ -927,7 +933,7 @@ inline void Render_opengl::draw_stored_events(std::vector<Event_> &events){
/* Manage the event drawing size from state size and render area dimensions */
Element_pos event_scale_x = _state_scale*((_render_width-_default_entity_x_translate)/(_state_x_max-_state_x_min));
Element_pos event_scale_y = _y_state_scale*(_render_height-_rule_height)/_container_y_max;
Element_pos event_scale_y = _y_state_scale*(_render_height-_ruler_height)/_container_y_max;
Element_pos radius;/* the circle radius */
Element_pos angle;
......
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