Commit c5c265fe authored by Johnny Jazeix's avatar Johnny Jazeix

Ajout de l'aide (temporaire???)

parent aa944f4a
#include "help.hpp"
Help::Help() : QWidget() {
setBaseSize(QSize(800, 600));
setWindowTitle("ViTE help");
QIcon icon;
icon.addPixmap(QPixmap(QString::fromUtf8("../img/logo.png")), QIcon::Normal, QIcon::Off);
setWindowIcon(icon);
_text = new QTextEdit("", this);
_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->setReadOnly(true);
_cancel->move(600, 600);
QObject::connect(_cancel, SIGNAL(clicked()), this, SLOT(close()));
}
Help::~Help(){
delete _text;
delete _cancel;
}
/*!
*\file help.hpp
*/
#ifndef HELP_HPP
#define HELP_HPP
#include <QtGui>
class Help : public QWidget{
private:
QTextEdit *_text;
QPushButton *_cancel;
public:
Help();
~Help();
};
#endif // HELP_HPP
......@@ -35,7 +35,8 @@ Interface_graphic::Interface_graphic(Interface_console* core, QWidget *parent):Q
load_windows();
setMouseTracking (true);/* to catch mouse events */
_help_widget = new Help();
}
Interface_graphic::~Interface_graphic(){
......@@ -476,8 +477,12 @@ void Interface_graphic::on_help_triggered(){
/**************************************************/
/* Not Yet Implemented -> Display the user manual */
/**************************************************/
error("Help : not yet implemented");
if(_help_widget->isVisible()){
_help_widget->hide();
}
else{
_help_widget->show();
}
}
......
......@@ -19,7 +19,7 @@ class Interface_graphic;
#include "interface_console.hpp"
#include "resource.hpp"
#include "help.hpp"
/*!
*\brief This class is a graphical interface which creates a window, it inherited from the Interface interface.
......@@ -182,6 +182,10 @@ class Interface_graphic : public QMainWindow, protected Ui::main_window, public
QPushButton* _ui_export_ok_button;
/*!
* \brief Text area which informs the user about the selected entity information.
*/
Help *_help_widget;
/***********************************
......
......@@ -35,6 +35,7 @@ HEADERS += message/Message.hpp \
interface/interface_graphic.hpp \
interface/Progress_bar_thread.hpp \
interface/resource.hpp \
interface/help.hpp \
# Render headers
render/render.hpp \
render/render_opengl.hpp \
......@@ -90,6 +91,7 @@ SOURCES += message/Message.cpp \
interface/interface_console.cpp \
interface/interface_graphic.cpp \
interface/Progress_bar_thread.cpp \
interface/help.cpp \
# Render code files
render/render_opengl.cpp \
render/render_svg.cpp \
......
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