ScreenTranslator/Manager.h

58 lines
1.1 KiB
C
Raw Normal View History

2013-11-23 13:48:34 +07:00
#ifndef MANAGER_H
#define MANAGER_H
#include <QPixmap>
2013-11-24 20:06:19 +07:00
#include <QSystemTrayIcon>
2013-11-23 13:48:34 +07:00
2013-11-26 13:44:00 +07:00
#include "ProcessingItem.h"
2013-11-24 19:43:37 +07:00
class QAction;
2013-11-23 13:48:34 +07:00
class QMenu;
class SelectionDialog;
2013-11-26 13:44:00 +07:00
class ResultDialog;
2014-04-04 21:39:10 +07:00
class LanguageHelper;
2013-11-23 13:48:34 +07:00
class Manager : public QObject
{
Q_OBJECT
public:
explicit Manager(QObject *parent = 0);
~Manager ();
signals:
void showPixmap (QPixmap pixmap);
2013-11-24 19:43:37 +07:00
void settingsEdited ();
2013-11-23 13:48:34 +07:00
private slots:
void capture ();
void settings ();
void close ();
2013-11-24 20:06:19 +07:00
void about ();
void showLast ();
void copyLastToClipboard ();
2013-11-23 13:48:34 +07:00
2013-11-24 19:43:37 +07:00
void applySettings ();
2013-11-24 20:06:19 +07:00
void processTrayAction (QSystemTrayIcon::ActivationReason reason);
2013-11-26 13:44:00 +07:00
void showResult (ProcessingItem item);
2013-11-24 19:43:37 +07:00
void showError (QString text);
2013-11-23 13:48:34 +07:00
private:
QMenu* trayContextMenu ();
private:
QSystemTrayIcon* trayIcon_;
2014-04-04 21:39:10 +07:00
LanguageHelper* dictionary_;
2013-11-23 13:48:34 +07:00
SelectionDialog* selection_;
2013-11-26 13:44:00 +07:00
ResultDialog* resultDialog_;
2013-11-24 19:43:37 +07:00
QAction* captureAction_;
QAction* repeatAction_;
QAction* clipboardAction_;
ProcessingItem lastItem_;
bool useResultDialog_;
2013-11-23 13:48:34 +07:00
};
#endif // MANAGER_H