Kamil Dudka

emulT9 (C++, Qt4)

File detail

Name:DownloademulT9.h [Download]
Location: emulT9 > src
Size:1.9 KB
Last modification:2007-08-27 01:12

Source code

#ifndef EMULT9_H
#define EMULT9_H
#include <QShortcut>
#include "ui_main.h"
#include "engine.h"
 * Main window based class.
class EmulT9: public QMainWindow {
    EmulT9(QApplication *app);                ///< \param app Pointer to QApplication object.
    Ui::MainWindow _design;                   ///< Base application layout generated by designer.
    Engine _engine;                           ///< Typer engine. Consult engine.h for more information.
    void closeEvent(QCloseEvent *event);      ///< Standard "Ask for save" application procedure
  private slots:
    void initKeyb (bool bPC);                 ///< Called on cbPC state changed.
    void initTimer (bool bT9);                ///< Called on cbT9 state changed.
    void initTimerSld (bool bTimer);          ///< Called on cbTimer state changed.
    void updateTimerSldVal (int val);         ///< Called on sldTimer value changed.
    void updateStartPause();                  ///< Called on now-writing state changed.
    void toggleStartPause();                  ///< Start/pause button onClick event.
    void tryReset();                          ///< Reset button onClick event.
    void keyPressed();                        ///< Key pressed event. Connected to KeyScan object.
    void focusChanged(QWidget *, QWidget *);  ///< Pause writing on switching to other application.
    void scPause();
    void start();                             ///< Start writing!
    void stop();                              ///< Pause writing!
    void reset();                             ///< Delete all data!
    QShortcut _scPause;                       ///< Pause writing.
    bool _bNowWriting;                        ///< now-writing state
    bool _bNeedSave;                          ///< true if reasonable changes were made to text edit
    void setNowWriting(bool bNowWriting);     ///< change now-writing state