# mv src/*.o bin/ # Object files are moved manually.
@echo" "
@echo"Compilation completed! (release)"
@echo" "
...
...
@@ -28,16 +27,21 @@ doc:
rebuild:
cd ./src && qmake-qt4 -project"DESTDIR=../bin""CONFIG+=uitools""QT+=opengl"&& qmake-qt4 -makefile-o Makefile src.pro && make all
# mv src/*.o bin/ # Object files are moved manually.
cd ./src && qmake-qt4 -project"TARGET=vite""OBJECTS_DIR=../bin""DESTDIR=../bin""CONFIG+=uitools""QT+=opengl"&& qmake-qt4 -makefile-o Makefile src.pro && make all
@echo" "
@echo"Rebuilt and compiled! (release)"
@echo" "
plugins:
cd ./plugin && qmake-qt4 && make
@echo" "
@echo"Plugins are built and installed ! Please manually install it ('libplugin.so') from 'plugin' folder to the qtdesigner plugin folder ('/usr/lib/qt4/plugins/designer' on linux) (plugin)"
@echo" "
debugs:
cd ./src && qmake-qt4 -project&& qmake-qt4 -makefile-o Makefile "CONFIG+=uitools debug console""QT+=opengl""DESTDIR = ../debug" src.pro && make all
cd ./src && qmake-qt4 -project&& qmake-qt4 -makefile-o Makefile "OBJECTS_DIR=../debug""CONFIG+=uitools debug console""QT+=opengl""DESTDIR = ../debug" src.pro && make all
mv src/*.o bin/
@echo" "
@echo"Compilation completed! (debug)"
...
...
@@ -45,7 +49,7 @@ debugs:
tests:rebuild
cd ./tests && qmake-qt4 -project&& qmake-qt4 -makefile-o Makefile "CONFIG+=uitools""QT+= opengl""DESTDIR = ../bin" tests.pro && make all
cd ./tests && qmake-qt4 -project&& qmake-qt4 -makefile-o Makefile "OBJECTS_DIR=../bin""CONFIG+=uitools""QT+= opengl""DESTDIR = ../bin" tests.pro && make all
@@ -7,6 +7,9 @@ For Debian/Ubuntu users, you can use apt-get :
sudo apt-get install libqt4-dev libqt4-opengl-dev
For Doxygen, it necessary to have epstopdf for the latex version. You can install it with the package texlive-extra-utils.
Then, until Qt development files are installed, you can compile ViTE :
...
...
@@ -15,6 +18,8 @@ make rebuild -> the first time you compile the project. Compiled files are place
make -> if you have ever done "make rebuild". Compiled files are placed in "bin" folder.
make plugins -> the first time you compile the project. It generates the 'libplugin.so' file in 'plugin' folder which used by qtDesigner for the render area.
make doc -> generates the documentation of the source code.
make tests -> to compile test files. Compiled files are placed in "bin" folder.
*\brief This is an interface, used by the terminal and graphical interfaces.
*\file interface.hpp
*/
#ifndef INTERFACE_H
#define INTERFACE_H
#ifndef INTERFACE_HPP
#define INTERFACE_HPP
#include "resource.hpp"
/*!
*\brief This class is an interface for the human interaction with the program.
*\brief This is an interface, used by the terminal and graphical interfaces.
*
*Interface defines functions implemented in their inherited classes. It gives functions which can be used by others parts of ViTE (for example the Parser and the Data Structure). Thus, it hides which kind of interface is used: a console interface (where messages are displayed in the terminal) or a graphical interface (where messages are displayed in a dialog box).
*/
classInterface{
public:
/*!
\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.
* \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.
*/
virtualboolerror(conststring)const=0;
virtualvoiderror(conststring)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.
CKFP(ui_main_window=loader.load(&file_main,this),"Cannot open the .ui file : "<<UI_MAIN_WINDOW_NAME);
CKFP(_ui_main_window=loader.load(&file_main,this),"Cannot open the .ui file : "<<UI_MAIN_WINDOW_NAME);
file_main.close();
file_info.open(QFile::ReadOnly);
CKFP(ui_info_window=loader.load(&file_info,ui_main_window),"Cannot open the .ui file : "<<UI_MAIN_WINDOW_NAME);
CKFP(_ui_info_window=loader.load(&file_info,_ui_main_window),"Cannot open the .ui file : "<<UI_MAIN_WINDOW_NAME);
file_info.close();
ui_info_window->setWindowOpacity(0.7);/* Change alpha value of the informative window */
ui_info_window->setWindowFlags(ui_info_window->windowFlags()|Qt::WindowStaysOnTopHint);/* Always display info_window on top */
CKFP(ui_render_area=qFindChild<QWidget*>(this,"render_area"),"Cannot find the render_area QWidget in the .ui file");
CKFP(ui_fullscreen_menu=qFindChild<QAction*>(this,"fullscreen"),"Cannot find the fullscreen menu in the .ui file");
_ui_info_window->setWindowOpacity(0.7);/* Change alpha value of the informative window */
_ui_info_window->setWindowFlags(_ui_info_window->windowFlags()|Qt::CustomizeWindowHint);/* Always display info_window on top */
CKFP(_ui_render_area=qFindChild<QWidget*>(this,"render_area"),"Cannot find the render_area QWidget in the .ui file");
CKFP(_ui_fullscreen_menu=qFindChild<QAction*>(this,"fullscreen"),"Cannot find the fullscreen menu in the .ui file");
/*
Special function of Qt which allows methods declared as slots and which name are 'on_[widget]_[action]()' to be called when the 'widget' triggered the signal corresponding to 'action'.
*/
QMetaObject::connectSlotsByName(this);
ui_main_window->show();/* display the main window */
ui_info_window->show();/* display the info window */
_ui_main_window->show();/* Display the main window */
_ui_info_window->show();/* Display the info window */
}
Interface_graphic::~Interface_graphic(){
/* Qt desallocates ui_main_window and _render_area automatically */
/* Qt desallocates _ui_main_window, _ui_info_window and _render_area automatically */