1ff0643 by Enrico Ros at 2009-02-20 1
/***************************************************************************
0e5745d by Enrico Ros at 2009-05-31 2
 * Copyright (c) 2009 Enrico Ros                                           *
3
 *         2009 Enrico Ros <enrico.ros@email.it>                           *
4
 *         2009 Alberto Scarpa <skaal.sl@gmail.com>                        *
1ff0643 by Enrico Ros at 2009-02-20 5
 *                                                                         *
6
 * Permission is hereby granted, free of charge, to any person             *
7
 * obtaining a copy of this software and associated documentation          *
8
 * files (the "Software"), to deal in the Software without                 *
9
 * restriction, including without limitation the rights to use,            *
10
 * copy, modify, merge, publish, distribute, sublicense, and/or sell       *
11
 * copies of the Software, and to permit persons to whom the               *
12
 * Software is furnished to do so, subject to the following                *
13
 * conditions:                                                             *
14
 *                                                                         *
15
 * The above copyright notice and this permission notice shall be          *
16
 * included in all copies or substantial portions of the Software.         *
17
 *                                                                         *
18
 ***************************************************************************/
19
cbdc84f by Enrico Ros at 2009-02-20 20
#ifndef APPWIDGET_H
21
#define APPWIDGET_H
22
1ff0643 by Enrico Ros at 2009-02-20 23
#include <QWidget>
24
class QPixmap;
25
class QPoint;
26
class QSettings;
e45848b by Enrico Ros at 2009-05-31 27
class ScreenCapture;
28
class AbstractGame;
6336a38 by Enrico Ros at 2009-02-25 29
class Ocr;
e45848b by Enrico Ros at 2009-05-31 30
class RegionWidget;
cbdc84f by Enrico Ros at 2009-02-20 31
1ff0643 by Enrico Ros at 2009-02-20 32
namespace Ui { class AppWidgetClass; }
cbdc84f by Enrico Ros at 2009-02-20 33
34
class AppWidget : public QWidget
35
{
36
    Q_OBJECT
1ff0643 by Enrico Ros at 2009-02-20 37
    public:
38
        AppWidget(QWidget *parent = 0);
39
        ~AppWidget();
cbdc84f by Enrico Ros at 2009-02-20 40
e45848b by Enrico Ros at 2009-05-31 41
    protected:
42
        void mousePressEvent(QMouseEvent * event);
43
        void mouseMoveEvent(QMouseEvent * event);
44
        void mouseReleaseEvent(QMouseEvent * event);
45
1ff0643 by Enrico Ros at 2009-02-20 46
    private:
47
        void saveSettings();
48
        Ui::AppWidgetClass * ui;
49
        QSettings * m_settings;
e45848b by Enrico Ros at 2009-05-31 50
        AbstractGame * m_game;
51
        ScreenCapture * m_capture;
6336a38 by Enrico Ros at 2009-02-25 52
        Ocr * m_ocr;
e45848b by Enrico Ros at 2009-05-31 53
        RegionWidget * m_pickingRegion;
cbdc84f by Enrico Ros at 2009-02-20 54
1ff0643 by Enrico Ros at 2009-02-20 55
    private Q_SLOTS:
e45848b by Enrico Ros at 2009-05-31 56
        void on_gameNo_toggled(bool checked);
57
        void on_gameWc_toggled(bool checked);
58
        void on_gameWcLearn_toggled(bool checked);
59
        void on_pickRegionButton_clicked();
6336a38 by Enrico Ros at 2009-02-25 60
        void on_trainButton_clicked();
1ff0643 by Enrico Ros at 2009-02-20 61
        void slotOnTopChanged();
62
        void slotCapParamsChanged();
63
        void slotProcessPixmap( const QPixmap & pixmap, const QPoint & cursor );
cbdc84f by Enrico Ros at 2009-02-20 64
};
65
66
#endif // APPWIDGET_H