Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit f73f4684 authored by Olivier Lagrasse's avatar Olivier Lagrasse
Browse files

Realisation de l'ecran d'attente (lapin qui tourne) + liage des messages...

Realisation de l'ecran d'attente (lapin qui tourne) + liage des messages d'erreurs et d'avertissement a la console et a la fenetre d'information + preparation pour la lecture des traces depuis la structure de donnees + ajout des raccourcis claviers et icones
parent 0663dc75
......@@ -26,7 +26,7 @@ doc:
@echo " "
rebuild:
build:
cd ./src && qmake-qt4 -project "RESOURCES= vite.qrc" "OBJECTS_DIR=../bin" "DESTDIR=../bin" "CONFIG+=uitools" "QT+=opengl" && qmake-qt4 -makefile -o Makefile src.pro && make all
@echo " "
@echo "Rebuilt and compiled! (release)"
......
......@@ -14,7 +14,7 @@ For Doxygen, it necessary to have epstopdf for the latex version. You can instal
Then, until Qt development files are installed, you can compile ViTE :
make rebuild -> the first time you compile the project. Compiled files are placed in "bin" folder.
make build -> the first time you compile the project. Compiled files are placed in "bin" folder.
make -> if you have ever done "make rebuild". Compiled files are placed in "bin" folder.
......
interface/src/img/logo.png

14.9 KB | W: | H:

interface/src/img/logo.png

11 KB | W: | H:

interface/src/img/logo.png
interface/src/img/logo.png
interface/src/img/logo.png
interface/src/img/logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -5,13 +5,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>607</width>
<height>187</height>
<width>472</width>
<height>199</height>
</rect>
</property>
<property name="windowTitle" >
<string>Informations</string>
</property>
<property name="windowIcon" >
<iconset resource="vite.qrc" >
<normaloff>:/icon/icon/vite.png</normaloff>:/icon/icon/vite.png</iconset>
</property>
<widget class="QWidget" name="centralwidget" >
<layout class="QHBoxLayout" name="horizontalLayout_2" >
<item>
......@@ -30,29 +34,28 @@
<property name="title" >
<string>Trace Resume</string>
</property>
<widget class="QTextEdit" name="info_trace_text" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>271</width>
<height>91</height>
</rect>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<layout class="QHBoxLayout" name="horizontalLayout_3" >
<item>
<widget class="QTextEdit" name="info_trace_text" >
<property name="verticalScrollBarPolicy" >
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Trace informations&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="textInteractionFlags" >
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="textInteractionFlags" >
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
......@@ -60,29 +63,25 @@ p, li { white-space: pre-wrap; }
<property name="title" >
<string>Selection Informations</string>
</property>
<widget class="QTextEdit" name="info_selection_text" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>271</width>
<height>91</height>
</rect>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<layout class="QHBoxLayout" name="horizontalLayout_4" >
<item>
<widget class="QTextEdit" name="info_selection_text" >
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Selection informations&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="textInteractionFlags" >
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="textInteractionFlags" >
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
......@@ -94,13 +93,15 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
<width>607</width>
<width>472</width>
<height>26</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar" />
</widget>
<resources/>
<resources>
<include location="vite.qrc" />
</resources>
<connections/>
</ui>
......@@ -21,17 +21,23 @@ class Interface{
/*!
* \arg string : the string to be displayed.
* \brief The function takes a string then displayed it either on the terminal if there is an Interface_console instance, or on a dialof box for the Interface_graphic. Then, it killed the application.
* \brief The function takes a string then displayed it either on the terminal if there is an Interface_console instance, or on a dialog box for the Interface_graphic. Then, it killed the application.
*/
virtual void error(const string) const =0;
;
/*!
\arg string : the string to be displayed.
\brief The function takes a string then displayed it either on the terminal if there is an Interface_console instance, or on a dialof box for the Interface_graphic. Then the program go on.
\brief The function takes a string then displayed it either on the terminal if there is an Interface_console instance, or on a dialog box for the Interface_graphic. Then the program go on, but with an indeterminated behaviour.
*/
virtual void warning(const string) const =0;
/*!
\arg string : the string to be displayed.
\brief The function takes a string then displayed it either on the terminal if there is an Interface_console instance, or on a dialog box for the Interface_graphic. Then the program go on normally.
*/
virtual void information(const string) const =0;
};
......
......@@ -23,8 +23,18 @@ Interface_console::Interface_console(int argc, char ** argv){
int Interface_console::get_state(int argc, char** argv){
return STATE_LAUNCH_GRAPHICAL_INTERFACE;
if (argc==1){/* just the name of the program, launch the window interface */
return STATE_LAUNCH_GRAPHICAL_INTERFACE;
}
else if (argc==2){/* There is one argument */
if (strncmp(argv[1], "-h", 2)==0)/* display the help message */
return STATE_DISPLAY_HELP;
}
return STATE_UNKNOWN;
}
......@@ -35,6 +45,7 @@ void Interface_console::launch_action(int state){
case STATE_DISPLAY_HELP :
display_help();
exit(EXIT_SUCCESS);
break;
case STATE_LAUNCH_GRAPHICAL_INTERFACE :
......@@ -46,14 +57,23 @@ void Interface_console::launch_action(int state){
break;
default:
warning("Cannot determine the arguments past");
default:/* like STATE_UNKNOWN */
display_help();
warning(string("Cannot determine the arguments past. Please check the correct syntax."));
exit(EXIT_SUCCESS);
}
}
void Interface_console::display_help(){
cerr << endl
<< " *** ViTE ***" << endl << endl << endl
<< "SYNOPSIS:" << endl
<< "vite [argument list]" << endl << endl
<< "ARGUMENT LIST:" << endl
<< "-h : display the help" << endl << endl;
}
......@@ -65,8 +85,14 @@ Interface_console::~Interface_console(){
void Interface_console::error(const string s) const{
cerr << "ERROR : " << s <<endl;
}
void Interface_console::warning(const string s) const{
cerr << "Warning : "<< s <<endl;
}
void Interface_console::information(const string s) const{
cerr << s <<endl;
}
......@@ -10,6 +10,12 @@
#include "interface_graphic.hpp"
/*!
*\brief An error state
*/
#define STATE_UNKNOWN -1
/*!
*\brief A state which corresponds to display a help text.
*/
......@@ -89,10 +95,18 @@ class Interface_console : public Interface{
/*!
\arg string : the string to be displayed.
\brief The function takes a string then displayed it into the terminal, then the program go on.
\brief The function takes a string then displayed it into the terminal, then the program go on with an indeterminated behaviour.
*/
void warning(const string) const;
/*!
\arg string : the string to be displayed.
\brief The function takes a strings then displayed it into the terminal, then the program go on.
*/
void information(const string) const;
};
......
......@@ -19,6 +19,10 @@ Interface_graphic::Interface_graphic(QWidget *parent):QWidget(parent){
QFile file_info(UI_INFO_WINDOW_NAME);
/* Init pointer attributes */
// _parser = NULL;
//_trace = NULL;
/* Load the main window from a .ui file */
file_main.open(QFile::ReadOnly);
CKFP(_ui_main_window = loader.load(&file_main, this), "Cannot open the .ui file : " << UI_MAIN_WINDOW_NAME);
......@@ -40,7 +44,7 @@ Interface_graphic::Interface_graphic(QWidget *parent):QWidget(parent){
CKFP(_ui_info_trace_text = qFindChild<QTextEdit*>(this, "info_trace_text"), "Cannot find the info_trace_text QTextEdit widget in the .ui file");
/* Create the render area and bind it to a layout (_ui_render_area_layout) */
_ui_render_area = new Render_area();
_ui_render_area = new Render_area(this);
_ui_render_area_layout->addWidget(_ui_render_area);
/*
......@@ -49,8 +53,8 @@ Interface_graphic::Interface_graphic(QWidget *parent):QWidget(parent){
QMetaObject::connectSlotsByName(this);
/* Display both the main and informative windows */
_ui_main_window->show();
_ui_info_window->show();
_ui_main_window->show();
}
......@@ -62,15 +66,34 @@ Interface_graphic::~Interface_graphic(){
void Interface_graphic::error(const string s) const{
QString buf = s.c_str();
_ui_info_trace_text->moveCursor(QTextCursor::Start);/* Insert the new text on the beginning */
_ui_info_trace_text->insertHtml("<font color='red'>"+buf+"</font><br />");
}
void Interface_graphic::warning(const string s) const{
QString buf = s.c_str();
_ui_info_trace_text->insertHtml(buf+"<br />");
_ui_info_trace_text->moveCursor(QTextCursor::Start);/* Insert the new text on the beginning */
_ui_info_trace_text->insertHtml("<font color='orange'>"+buf+"</font><br />");
}
void Interface_graphic::information(const string s) const{
QString buf = s.c_str();
_ui_info_trace_text->moveCursor(QTextCursor::Start);/* Insert the new text on the beginning */
_ui_info_trace_text->insertHtml("<font color='green'>"+buf+"</font><br />");
}
bool Interface_graphic::build(){
return _ui_render_area->build();
}
/***** SLOTS *****/
......@@ -90,18 +113,28 @@ void Interface_graphic::on_open_triggered(){
/* Not Yet Implemented -> Send file path to the parser */
/*******************************************************/
cerr << "Open file : " << filename.toStdString() << endl;
error("Open : not yet implemented");
information(string("Open file : ")+ filename.toStdString());
/*
_trace = new Trace();
_parser = new Parser();
_parser->parse(filename.toStdString(), _trace);
delete _parser;
_parser = NULL;
_list_container = _trace->get_root_containers();
*/
}
void Interface_graphic::on_close_triggered(){
/*******************************************************************************************/
/***********************************************************************************************/
/* Not Yet Implemented -> Stop the parser and the data structure if they are still implemented */
/*******************************************************************************************/
/***********************************************************************************************/
cerr << "Close file. ";
error("Close : not yet implemented");
}
......@@ -126,7 +159,12 @@ void Interface_graphic::on_fullscreen_triggered(){
_ui_main_window->showFullScreen();
else
_ui_main_window->showNormal();
}
void Interface_graphic::on_show_info_triggered(){
_ui_info_window->show();
}
......@@ -136,7 +174,7 @@ void Interface_graphic::on_help_triggered(){
/* Not Yet Implemented -> Display the user manual */
/**************************************************/
cerr << "Display help. ";
error("Help : not yet implemented");
}
......
......@@ -6,6 +6,8 @@
#define INTERFACE_GRAPHIC_HPP
class Interface_graphic;
#include "interface.hpp"
#include "render_area.hpp"
......@@ -54,8 +56,17 @@ class Interface_graphic : public QWidget, public Interface{
/*!
* \brief The parser attribute.
*/
// Parser* _parser;
//Parser* _parser;
/*!
* \brief The data structure attribute.
*/
//Trace* _trace;
/*!
* \brief The container lists.
*/
// list<Container *> _list_container;
public:
......@@ -72,19 +83,31 @@ public:
/*!
* \arg string : the string to be displayed.
*\brief The function takes a string then displayed an info box containing it, then the application will be killed.
*\brief The function takes strings and/or numbers then displayed an info box containing it, then the application will be killed.
*/
void error(const string) const;
/*!
*\arg string : the string to be displayed.
*\brief The function takes a string then displayed an info box containing it, then the program go on.
*\brief The function takes strings and/or numbers then displayed an info box containing it, then the program go on with an indeterminated behaviour.
*/
void warning(const string) const;
/*!
*\arg string : the string to be displayed.
*\brief The function takes strings and/or numbers then displayed an info box containing it, then the program go on.
*/
void information(const string) const;
/*!
*\brief This function will build the trace sent by the data structure ('_trace').
*/
bool build();
protected slots:
......@@ -108,6 +131,11 @@ protected slots:
*/
void on_fullscreen_triggered();
/*!
*\brief A slot which called when 'show infos' in the menu is clicked.
*/
void on_show_info_triggered();
/*!
*\brief A slot which called when 'help' in the menu is clicked.
*/
......
......@@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>676</width>
<height>479</height>
<width>888</width>
<height>605</height>
</rect>
</property>
<property name="sizePolicy" >
......@@ -22,135 +22,13 @@
<string>ViTE</string>
</property>
<property name="windowIcon" >
<iconset>
<normaloff>img/logo.png</normaloff>img/logo.png</iconset>
<iconset resource="vite.qrc" >
<normaloff>:/icon/icon/vite.png</normaloff>:/icon/icon/vite.png</iconset>
</property>
<widget class="QWidget" name="centralwidget" >
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<layout class="QHBoxLayout" name="horizontalLayout" >
<property name="sizeConstraint" >
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<widget class="QToolButton" name="toolButton_2" >
<property name="text" >
<string>Open</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>Zoom</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>Scale</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_2" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Line" name="line_3" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton_6" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>Temporal Selection</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton_5" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>Filters...</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton_3" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>Colors...</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="render_area_layout" >
<item>
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
<layout class="QVBoxLayout" name="render_area_layout" />
</item>
</layout>
</widget>
......@@ -159,7 +37,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>676</width>
<width>888</width>
<height>26</height>
</rect>
</property>
......@@ -185,13 +63,14 @@
<property name="title" >
<string>&amp;View</string>
</property>
<addaction name="show_info" />
<addaction name="separator" />
<addaction name="fullscreen" />
</widget>
<addaction name="menuFile" />