Rename sources and put them to src dir

This commit is contained in:
Gres 2020-01-26 22:01:08 +03:00
parent 12cb3bf4ab
commit d198c88625
38 changed files with 118 additions and 115 deletions

View File

@ -26,49 +26,52 @@ LIBS += -ltesseract -llept
include(3rd-party/qtsingleapplication/qtsingleapplication.pri)
SOURCES += main.cpp\
Manager.cpp \
SettingsEditor.cpp \
SelectionDialog.cpp \
GlobalActionHelper.cpp \
Recognizer.cpp \
ResultDialog.cpp \
ProcessingItem.cpp \
ImageProcessing.cpp \
LanguageHelper.cpp \
WebTranslator.cpp \
WebTranslatorProxy.cpp \
TranslatorHelper.cpp \
RecognizerHelper.cpp \
Utils.cpp \
Updater.cpp
INCLUDEPATH += src
HEADERS += \
Manager.h \
SettingsEditor.h \
SelectionDialog.h \
GlobalActionHelper.h \
Recognizer.h \
Settings.h \
ProcessingItem.h \
ResultDialog.h \
ImageProcessing.h \
LanguageHelper.h \
WebTranslator.h \
WebTranslatorProxy.h \
StAssert.h \
TranslatorHelper.h \
RecognizerHelper.h \
Utils.h \
Updater.h
SOURCES += \
src/main.cpp \
src/manager.cpp \
src/settingseditor.cpp \
src/selectiondialog.cpp \
src/globalactionhelper.cpp \
src/recognizer.cpp \
src/resultdialog.cpp \
src/processingitem.cpp \
src/imageprocessing.cpp \
src/languagehelper.cpp \
src/webtranslator.cpp \
src/webtranslatorproxy.cpp \
src/translatorhelper.cpp \
src/recognizerhelper.cpp \
src/utils.cpp \
src/updater.cpp
FORMS += \
SettingsEditor.ui \
SelectionDialog.ui \
ResultDialog.ui
HEADERS += \
src/manager.h \
src/settingseditor.h \
src/selectiondialog.h \
src/globalactionhelper.h \
src/recognizer.h \
src/settings.h \
src/processingitem.h \
src/resultdialog.h \
src/imageprocessing.h \
src/languagehelper.h \
src/webtranslator.h \
src/webtranslatorproxy.h \
src/stassert.h \
src/translatorhelper.h \
src/recognizerhelper.h \
src/utils.h \
src/updater.h
FORMS += \
src/settingseditor.ui \
src/selectiondialog.ui \
src/resultdialog.ui
RESOURCES += \
Recources.qrc
recources.qrc
TRANSLATIONS += \
translations/translation_en.ts \
@ -81,7 +84,7 @@ OTHER_FILES += \
distr/* \
version.json \
README.md \
uncrustify.cfg\
uncrustify.cfg \
.travis.yml \
TODO.md

View File

@ -1,4 +1,4 @@
#include "GlobalActionHelper.h"
#include "globalactionhelper.h"
#include <QDebug>
#include <QApplication>

View File

@ -2,8 +2,8 @@
#include <leptonica/allheaders.h>
#include "ImageProcessing.h"
#include "StAssert.h"
#include "imageprocessing.h"
#include "stassert.h"
#if defined(Q_OS_LINUX)
# include <fstream>

View File

@ -1,9 +1,9 @@
#include <QDir>
#include <QSettings>
#include "LanguageHelper.h"
#include "Settings.h"
#include "StAssert.h"
#include "languagehelper.h"
#include "settings.h"
#include "stassert.h"
LanguageHelper::LanguageHelper () {
init ();

View File

@ -7,8 +7,8 @@
#include <qtsingleapplication.h>
#include <Manager.h>
#include <Settings.h>
#include <manager.h>
#include <settings.h>
int main (int argc, char *argv[]) {
QtSingleApplication a (argc, argv);

View File

@ -1,4 +1,4 @@
#include "Manager.h"
#include "manager.h"
#include <QDebug>
#include <QMenu>
@ -13,17 +13,17 @@
#include <QInputDialog>
#include <QNetworkProxy>
#include "Settings.h"
#include "SettingsEditor.h"
#include "SelectionDialog.h"
#include "GlobalActionHelper.h"
#include "Recognizer.h"
#include "WebTranslator.h"
#include "ResultDialog.h"
#include "LanguageHelper.h"
#include "StAssert.h"
#include "Utils.h"
#include "Updater.h"
#include "settings.h"
#include "settingseditor.h"
#include "selectiondialog.h"
#include "globalactionhelper.h"
#include "recognizer.h"
#include "webtranslator.h"
#include "resultdialog.h"
#include "languagehelper.h"
#include "stassert.h"
#include "utils.h"
#include "updater.h"
Manager::Manager (QObject *parent) :
QObject (parent),
@ -246,13 +246,13 @@ void Manager::capture () {
QList<QScreen *> screens = QApplication::screens ();
foreach (QScreen * screen, screens) {
QRect geometry = screen->availableGeometry ();
#if QT_VERSION >= QT_VERSION_CHECK(5,10,0)
#if QT_VERSION >= QT_VERSION_CHECK (5,10,0)
QPixmap pixmap = screen->grabWindow (0, 0, 0,
geometry.width (), geometry.height ());
#else
#else
QPixmap pixmap = screen->grabWindow (0, geometry.x (), geometry.y (),
geometry.width (), geometry.height ());
#endif
#endif
QString name = screen->name ();
if (!selections_.contains (name)) {

View File

@ -5,7 +5,7 @@
#include <QSystemTrayIcon>
#include <QMap>
#include "ProcessingItem.h"
#include "processingitem.h"
class QAction;
class QMenu;

View File

@ -1,4 +1,4 @@
#include "ProcessingItem.h"
#include "processingitem.h"
ProcessingItem::ProcessingItem ()
: swapLanguages_ (false) {

View File

@ -1,14 +1,14 @@
#include "Recognizer.h"
#include "recognizer.h"
#include <tesseract/baseapi.h>
#include <QDebug>
#include <QSettings>
#include "Settings.h"
#include "ImageProcessing.h"
#include "StAssert.h"
#include "RecognizerHelper.h"
#include "settings.h"
#include "imageprocessing.h"
#include "stassert.h"
#include "recognizerhelper.h"
Recognizer::Recognizer (QObject *parent) :
QObject (parent),

View File

@ -4,7 +4,7 @@
#include <QObject>
#include "QPixmap"
#include "ProcessingItem.h"
#include "processingitem.h"
namespace tesseract {
class TessBaseAPI;

View File

@ -4,7 +4,7 @@
#include <QSettings>
#include <QApplication>
#include "RecognizerHelper.h"
#include "recognizerhelper.h"
RecognizerHelper::RecognizerHelper ()
: fileName_ ("st_subs.csv") {

View File

@ -1,7 +1,7 @@
#include "ResultDialog.h"
#include "ui_ResultDialog.h"
#include "StAssert.h"
#include "LanguageHelper.h"
#include "resultdialog.h"
#include "ui_resultdialog.h"
#include "stassert.h"
#include "languagehelper.h"
#include <QDesktopWidget>
#include <QMouseEvent>

View File

@ -4,7 +4,7 @@
#include <QDialog>
#include <QMenu>
#include "ProcessingItem.h"
#include "processingitem.h"
namespace Ui {
class ResultDialog;

View File

@ -1,7 +1,7 @@
#include "SelectionDialog.h"
#include "ui_SelectionDialog.h"
#include "LanguageHelper.h"
#include "StAssert.h"
#include "selectiondialog.h"
#include "ui_selectiondialog.h"
#include "languagehelper.h"
#include "stassert.h"
#include <QMouseEvent>
#include <QPainter>

View File

@ -5,7 +5,7 @@
#include <QPixmap>
#include <QMenu>
#include "ProcessingItem.h"
#include "processingitem.h"
namespace Ui {
class SelectionDialog;

View File

@ -1,10 +1,10 @@
#include "SettingsEditor.h"
#include "ui_SettingsEditor.h"
#include "LanguageHelper.h"
#include "TranslatorHelper.h"
#include "RecognizerHelper.h"
#include "StAssert.h"
#include "Utils.h"
#include "settingseditor.h"
#include "ui_settingseditor.h"
#include "languagehelper.h"
#include "translatorhelper.h"
#include "recognizerhelper.h"
#include "stassert.h"
#include "utils.h"
#include <QSettings>
#include <QFileDialog>
@ -12,7 +12,7 @@
#include <QRegExpValidator>
#include <QNetworkProxy>
#include "Settings.h"
#include "settings.h"
SettingsEditor::SettingsEditor (const LanguageHelper &dictionary, QWidget *parent) :
QDialog (parent),
@ -29,11 +29,11 @@ SettingsEditor::SettingsEditor (const LanguageHelper &dictionary, QWidget *paren
ui->updateCombo->addItems (updateTypes);
connect (ui->tessdataButton, SIGNAL (clicked ()), SLOT (openTessdataDialog ()));
connect (ui->tessdataEdit, SIGNAL (textChanged (const QString &)),
SLOT (initOcrLangCombo (const QString &)));
connect (ui->tessdataEdit, SIGNAL (textChanged (const QString&)),
SLOT (initOcrLangCombo (const QString&)));
connect (ui->recognizerFixTable, SIGNAL (itemChanged (QTableWidgetItem *)),
SLOT (recognizerFixTableItemChanged (QTableWidgetItem *)));
connect (ui->recognizerFixTable, SIGNAL (itemChanged (QTableWidgetItem*)),
SLOT (recognizerFixTableItemChanged (QTableWidgetItem*)));
ui->translateLangCombo->addItems (dictionary_.translateLanguagesUi ());
@ -196,7 +196,7 @@ void SettingsEditor::loadSettings () {
RecognizerHelper::Subs subs = recognizerHelper_->subs ();
ui->recognizerFixTable->setRowCount (subs.size ());
int row = 0;
foreach (const RecognizerHelper::Sub & sub, subs) {
foreach (const RecognizerHelper::Sub &sub, subs) {
if (!initSubsTableRow (row, sub.language)) {
continue;
}

View File

@ -3,8 +3,8 @@
#include <QFile>
#include <QApplication>
#include "TranslatorHelper.h"
#include "Settings.h"
#include "translatorhelper.h"
#include "settings.h"
TranslatorHelper::TranslatorHelper ()
: translatorsDir_ ("translators"), currentIndex_ (0), triesLeft_ (0) {

View File

@ -7,8 +7,8 @@
#include <QMessageBox>
#include <QApplication>
#include "Updater.h"
#include "StAssert.h"
#include "updater.h"
#include "stassert.h"
namespace {
#define FIELD(NAME) const QString _ ## NAME = #NAME
@ -47,8 +47,8 @@ Updater::Updater (QObject *parent)
componentsUpdating_ (0) {
updatesFileName_ = QApplication::applicationDirPath () + QDir::separator () + "updates.json";
backupSuffix_ = "_backup";
connect (network_, SIGNAL (finished (QNetworkReply *)),
SLOT (replyFinished (QNetworkReply *)));
connect (network_, SIGNAL (finished (QNetworkReply*)),
SLOT (replyFinished (QNetworkReply*)));
getCurrentVersion ();
updateCurrentVersion ();

View File

@ -1,6 +1,6 @@
#include <QNetworkProxy>
#include "Utils.h"
#include "utils.h"
QString encode (const QString &source) {
if (source.isEmpty ()) {

View File

@ -4,12 +4,12 @@
#include <QNetworkReply>
#include <QFile>
#include "WebTranslator.h"
#include "ProcessingItem.h"
#include "Settings.h"
#include "StAssert.h"
#include "WebTranslatorProxy.h"
#include "TranslatorHelper.h"
#include "webtranslator.h"
#include "processingitem.h"
#include "settings.h"
#include "stassert.h"
#include "webtranslatorproxy.h"
#include "translatorhelper.h"
WebTranslator::WebTranslator ()
: QObject (),
@ -25,11 +25,11 @@ WebTranslator::WebTranslator ()
connect (view_, SIGNAL (loadFinished (bool)), SLOT (loadFinished (bool)));
connect (view_->page ()->mainFrame (), SIGNAL (javaScriptWindowObjectCleared ()),
this, SLOT (addProxyToView ()));
connect (view_->page ()->networkAccessManager (), SIGNAL (finished (QNetworkReply *)),
this, SLOT (replyFinished (QNetworkReply *)));
connect (view_->page ()->networkAccessManager (), SIGNAL (finished (QNetworkReply*)),
this, SLOT (replyFinished (QNetworkReply*)));
connect (view_->page ()->networkAccessManager (),
SIGNAL (sslErrors (QNetworkReply *, QList<QSslError>)),
this, SLOT (handleSslErrors (QNetworkReply *, QList<QSslError>)));
SIGNAL (sslErrors (QNetworkReply*,QList<QSslError>)),
this, SLOT (handleSslErrors (QNetworkReply*,QList<QSslError>)));
translationTimeout_.setSingleShot (true);
connect (&translationTimeout_, SIGNAL (timeout ()), SLOT (abortTranslation ()));

View File

@ -5,7 +5,7 @@
#include <QMap>
#include <QTimer>
#include "ProcessingItem.h"
#include "processingitem.h"
class QWebView;
class QNetworkReply;

View File

@ -1,5 +1,5 @@
#include "WebTranslatorProxy.h"
#include "ProcessingItem.h"
#include "webtranslatorproxy.h"
#include "processingitem.h"
WebTranslatorProxy::WebTranslatorProxy (QObject *parent)
: QObject (parent) {