| 1 |
/*************************************************************************** |
| 2 |
* Copyright (c) 2009 Enrico Ros * |
| 3 |
* 2009 Enrico Ros <enrico.ros@email.it> * |
| 4 |
* 2009 Alberto Scarpa <skaal.sl@gmail.com> * |
| 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 |
|
| 20 |
#ifndef APPWIDGET_H |
| 21 |
#define APPWIDGET_H |
| 22 |
|
| 23 |
#include <QWidget> |
| 24 |
class QPixmap; |
| 25 |
class QPoint; |
| 26 |
class QSettings; |
| 27 |
class ScreenCapture; |
| 28 |
class AbstractGame; |
| 29 |
class Ocr; |
| 30 |
class RegionWidget; |
| 31 |
|
| 32 |
namespace Ui { class AppWidgetClass; } |
| 33 |
|
| 34 |
class AppWidget : public QWidget |
| 35 |
{ |
| 36 |
Q_OBJECT |
| 37 |
public: |
| 38 |
AppWidget(QWidget *parent = 0); |
| 39 |
~AppWidget(); |
| 40 |
|
| 41 |
protected: |
| 42 |
void mousePressEvent(QMouseEvent * event); |
| 43 |
void mouseMoveEvent(QMouseEvent * event); |
| 44 |
void mouseReleaseEvent(QMouseEvent * event); |
| 45 |
|
| 46 |
private: |
| 47 |
void saveSettings(); |
| 48 |
Ui::AppWidgetClass * ui; |
| 49 |
QSettings * m_settings; |
| 50 |
AbstractGame * m_game; |
| 51 |
ScreenCapture * m_capture; |
| 52 |
Ocr * m_ocr; |
| 53 |
RegionWidget * m_pickingRegion; |
| 54 |
|
| 55 |
private Q_SLOTS: |
| 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(); |
| 60 |
void on_trainButton_clicked(); |
| 61 |
void slotOnTopChanged(); |
| 62 |
void slotCapParamsChanged(); |
| 63 |
void slotProcessPixmap( const QPixmap & pixmap, const QPoint & cursor ); |
| 64 |
}; |
| 65 |
|
| 66 |
#endif // APPWIDGET_H |