Bachelor Thesis - Computer Graphics Group

Bachelor Thesis - Computer Graphics Group Bachelor Thesis - Computer Graphics Group

cgg.mff.cuni.cz
from cgg.mff.cuni.cz More from this publisher
10.08.2013 Views

uttons as used by the SendInput and GetAsyncKeyState functions remain and thus have to be remapped manually • in addition, the timeout timer has originally been implemented in the main application. However, problems due to thread scheduling and shifted time-spans between events when processed in the main application have emerged. The other reason was that the library did not know about the timeout actually. Gesture events were still being sent and ignored immediately by the main application. Therefore, the timeout had to be implemented fully in the library • high processor usage condition is also problematic. The application consuming the CPU can prevent the program, in which a gesture is being performed, from being scheduled sufficiently regularly. This leads to a significant number of points missing in the gesture shape, preventing any possible recognition. This problem has not been solved, as it proved to be a rare issue, although quite complex and time consuming to deal with 28

Chapter 5 Main application 5.1 Application design The application has a modular, object oriented design taking advantage of class inheritance and virtual methods. More advanced C++ features, such as templates, exceptions and smart pointers have been used to increase productivity and reliability. We also tried to exploit the potential of the Qt toolkit as much as possible by taking advantage of the modules and features it provides. These include QPointer, QObject, signals and slots, custom events, multithreading, XML, etc. However, there were many cases where the platform dependent Windows API had to be used to achieve things not possible in Qt. This is mainly due to the nature of the application. We have to control other applications and deal with the operating system. The application implementation is divided into separate more or less independent classes. The majority of the code belongs to class methods. Only small helper routines used all over the application are standard functions. By their nature, classes can be separated into four distinct groups: • core logic • helper classes • user interface • command implementations Application configuration is based on Extensible Markup Language (XML) [12] in order to be modular. It proved to be beneficial during the development, when the user interface has not yet been implemented. As the format is user readable, the configuration could be easily modified using a simple text editor 29

Chapter 5<br />

Main application<br />

5.1 Application design<br />

The application has a modular, object oriented design taking advantage of<br />

class inheritance and virtual methods. More advanced C++ features, such as<br />

templates, exceptions and smart pointers have been used to increase productivity<br />

and reliability. We also tried to exploit the potential of the Qt toolkit as<br />

much as possible by taking advantage of the modules and features it provides.<br />

These include QPointer, QObject, signals and slots, custom events, multithreading,<br />

XML, etc. However, there were many cases where the platform<br />

dependent Windows API had to be used to achieve things not possible in Qt.<br />

This is mainly due to the nature of the application. We have to control other<br />

applications and deal with the operating system.<br />

The application implementation is divided into separate more or less independent<br />

classes. The majority of the code belongs to class methods. Only small<br />

helper routines used all over the application are standard functions. By their<br />

nature, classes can be separated into four distinct groups:<br />

• core logic<br />

• helper classes<br />

• user interface<br />

• command implementations<br />

Application configuration is based on Extensible Markup Language (XML)<br />

[12] in order to be modular. It proved to be beneficial during the development,<br />

when the user interface has not yet been implemented. As the format is user<br />

readable, the configuration could be easily modified using a simple text editor<br />

29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!