Commit 1bdccca5 authored by Arthur Redondy's avatar Arthur Redondy

menu aide + suppression de trucs inutiles

parent 025df003
#include "help.hpp"
Help::Help() : QWidget() {
setBaseSize(QSize(800, 600));
setFixedSize(QSize(350, 600));
setWindowTitle("ViTE help");
QIcon icon;
icon.addPixmap(QPixmap(QString::fromUtf8("../img/logo.png")), QIcon::Normal, QIcon::Off);
icon.addPixmap(QPixmap(QString::fromUtf8(":icon/icon/vite.png")), QIcon::Normal, QIcon::Off);
setWindowIcon(icon);
_text = new QTextEdit("", this);
_contenu = new QWidget(this);
_contenu->setFixedSize(QSize(350,570));
_image = new QLabel(_contenu);
_image->setPixmap(QPixmap(QString::fromUtf8(":img/img/help.png")));
_text = new QTextEdit("", _contenu);
_cancel = new QPushButton("&Cancel", this);
_text->setHtml("<body bgcolor=\"#ff50ff\"><font color='pink'><center><blink><h1>Dépeches-toi !!!</h1></blink></center></font><br /><img src=\"../source/src/interface/img/test.jpeg\"></img></bgcolor>");
_text->move(0, 0);
_text->resize(700, 600);
_text->setHtml("<center><h1>Quick Help</h1></center>"
"<h2>Menu <em>File</em></h2>"
"<dl>"
"<dt><strong>Open a file</strong></dt>"
"<dd>menu <em>File</em> then <em>Open</em> (shortcut: ctrl + o)</dd>"
"<dt><strong>Export a file</strong></dt>"
"<dd>menu <em>File</em> then <em>Export</em> (shortcut: ctrl + e)</dd>"
"<dt><strong>Close a file</strong></dt>"
"<dd>menu <em>File</em> then <em>Close</em> (shortcut: ctrl + w)</dd>"
"<dt><strong>Quit ViTE</strong></dt>"
"<dd>menu <em>File</em> then <em>Quit</em> (shortcut: ctrl + q)</dd>"
"</dl>"
"<h2>Menu <em>View</em></h2>"
"<dl>"
"<dt><strong>Display/Hide the informations window</strong></dt>"
"<dd>menu <em>View</em> then <em>Show infos window</em></dd>"
"<dt><strong>Display/Hide the toolbar</strong></dt>"
"<dd>menu <em>View</em> then <em>Show/Hide toolbar</i</dd>"
"<dt><strong>Zoom in the trace</strong></dt>"
"<dd>menu <em>View</em> then <em>Zoom in</em> (shortcut: +)</dd>"
"<dt><strong>Zoom out of the trace</strong></dt>"
"<dd>menu <em>View</em> then <em>Zoom out</em> (shortcut: -)</dd>"
"<dt><strong>Show all the trace</strong></dt>"
"<dd>menu <em>View</em> then <em>Show all</em> (shortcut: ctrl + shift + A)</dd>"
"<dt><strong>Move to the beginning of the trace</strong></dt>"
"<dd>menu <em>View</em> then <em>Move to start</em> (shortcut: Home)</dd>"
"<dt><strong>Move to the end of the trace</strong></dt>"
"<dd>menu <em>View</em> then <em>Move to end</em> (shortcut: End)</dd>"
"<dt><strong>Switch to fullscreen mode</strong></dt>"
"<dd>menu <em>View</em> then <em>Fullscreen</em> (shortcut: F11)</dd>"
"<dt><strong>Display/Hide the warnings and errors</strong></dt>"
"<dd>menu <em>View</em> then <em>No warning</em></dd>"
"<dt><strong>Display/Hide the arrows and the events</strong></dt>"
"<dd>menu <em>View</em> then <em>No arrows and events</em></dd>"
"</dl>"
"<h2>Menu <em>Help</em></h2>"
"<dl>"
"<dt><strong>Show the quick help</strong></dt>"
"<dd>menu <em>Help</em> then <em>Help</em> (shortcut: F1)</dd>"
"<dt><strong>Informations about ViTE software</strong></dt>"
"<dd>menu <em>Help</em> then <em>About</em></dd>"
"</dl>"
"<h2>More help</h2>"
"<p>You can find more informations about the functions and the options of ViTE on the user manual.</p>");
_text->resize(350, 199);
_text->setReadOnly(true);
_cancel->move(600, 600);
_image->move(0,199);
_cancel->move(250, 570);
QObject::connect(_cancel, SIGNAL(clicked()), this, SLOT(close()));
}
......
......@@ -11,7 +11,9 @@ class Help : public QWidget{
private:
QTextEdit *_text;
QPushButton *_cancel;
QLabel *_image;
QWidget * _contenu;
public:
Help();
~Help();
......
......@@ -356,6 +356,9 @@ void Interface_graphic::on_open_triggered(){
void Interface_graphic::on_export_file_triggered(){
if(_is_rendering_trace == false)
return;
char temp[10];
sprintf(temp, "%9lf", Info::Render::_x_min_visible);
_ui_min_time_export->setText(temp);
......@@ -431,7 +434,7 @@ void Interface_graphic::on_close_triggered(){
void Interface_graphic::on_quit_triggered(){
((QWidget*)_help_widget)->close();
((QWidget*)this)->close();
}
......@@ -474,9 +477,6 @@ void Interface_graphic::on_show_info_triggered(){
void Interface_graphic::on_help_triggered(){
/**************************************************/
/* Not Yet Implemented -> Display the user manual */
/**************************************************/
if(_help_widget->isVisible()){
_help_widget->hide();
}
......@@ -604,7 +604,7 @@ void Interface_graphic::on_scale_container_state_valueChanged(int new_value){
void Interface_graphic::closeEvent(QCloseEvent *event){
((QWidget*)_help_widget)->close();
event->accept();/* accept to hide the window for a further destruction */
}
......
......@@ -361,7 +361,7 @@
<normaloff>:/icon/icon/zoom_in.png</normaloff>:/icon/icon/zoom_in.png</iconset>
</property>
<property name="text">
<string>Zoom_in</string>
<string>Zoom in</string>
</property>
<property name="shortcut">
<string>+</string>
......@@ -373,7 +373,7 @@
<normaloff>:/icon/icon/zoom_out.png</normaloff>:/icon/icon/zoom_out.png</iconset>
</property>
<property name="text">
<string>Zoom_out</string>
<string>Zoom out</string>
</property>
<property name="shortcut">
<string>-</string>
......
This diff is collapsed.
......@@ -18,6 +18,7 @@
</qresource>
<qresource prefix="img" >
<file>img/logo.png</file>
<file>img/help.png</file>
</qresource>
<qresource prefix="window" >
<file>info_window.ui</file>
......
......@@ -80,7 +80,7 @@ HEADERS += message/Message.hpp \
trace/tree/BinaryTree.hpp \
trace/tree/Node.hpp \
trace/tree/Interval.hpp
FORMS += interface/info_window.ui interface/main_window.ui interface/maquette.ui interface/option_export_window.ui
FORMS += interface/info_window.ui interface/main_window.ui interface/option_export_window.ui
SOURCES += message/Message.cpp \
message/Errors.cpp \
Tools.cpp \
......
#include "String.hpp"
size_t String::hash::operator()(const String &s) {
// return std::hash<const char *>((const char *)s._value);
}
bool String::equal_to::operator()(const String &s1, const String &s2) {
return s1._value == s2._value;
}
bool String::less_than::operator()(const String &s1, const String &s2) {
return s1._value < s2._value;
}
......
......@@ -23,25 +23,11 @@ private:
std::string _value;
public:
/*!
* \brief Functor hash function
*/
struct hash {
/*!
* \fn operator()(const String &)
* \brief Returns the string's hash value
*/
size_t operator()(const String &);
};
/*!
* \fn operator()(const String &, const String &)
* \brief Returns if the strings are equal
* \brief Returns true if the second string is greater than the first one
*/
struct equal_to {
bool operator()(const String &, const String &);
};
struct less_than {
bool operator()(const String &, const String &);
};
......
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