Permalink
Browse files

Conversion algorithm was fully changed;

Template parameters updated;
Revision info and translation are automatically compiled;
Icon updated;
Added menu item to open wiki.

Merge branch 'develop'
  • Loading branch information...
riuson committed Sep 1, 2012
2 parents 0421b4d + 7077b84 commit be13e6f34980f9b8eb23c0a82f508a1da36a8fa9
Showing with 7,530 additions and 4,360 deletions.
  1. +1 −0 .gitignore
  2. +27 −5 classes/action-handlers/actionfilehandlers.cpp
  3. +19 −0 classes/action-handlers/actionfilehandlers.h
  4. +19 −0 classes/action-handlers/actionfonthandlers.cpp
  5. +19 −0 classes/action-handlers/actionfonthandlers.h
  6. +19 −0 classes/action-handlers/actionhandlersbase.cpp
  7. +19 −0 classes/action-handlers/actionhandlersbase.h
  8. +27 −0 classes/action-handlers/actionhelphandlers.cpp
  9. +20 −0 classes/action-handlers/actionhelphandlers.h
  10. +19 −0 classes/action-handlers/actionimagehandlers.cpp
  11. +19 −0 classes/action-handlers/actionimagehandlers.h
  12. +22 −3 classes/action-handlers/actionsetuphandlers.cpp
  13. +20 −1 classes/action-handlers/actionsetuphandlers.h
  14. +2 −14 classes/bitmapcontainer.cpp
  15. +3 −4 classes/bitmapcontainer.h
  16. +0 −125 classes/bitmapdata.cpp
  17. +0 −111 classes/bytelistitemdelegate.cpp
  18. +0 −29 classes/{ → convert}/bitmaphelper.cpp
  19. +4 −11 classes/{ → convert}/bitmaphelper.h
  20. +119 −0 classes/convert/bitstream.cpp
  21. +27 −32 controls/widgetconvoptionsmono.h → classes/convert/bitstream.h
  22. +77 −0 classes/convert/conversion_options.h
  23. +421 −0 classes/convert/conversionmatrix.cpp
  24. +33 −30 controls/widgetconvoptionscolor.h → classes/convert/conversionmatrix.h
  25. +354 −0 classes/convert/conversionmatrixoptions.cpp
  26. +101 −0 classes/convert/conversionmatrixoptions.h
  27. +467 −0 classes/convert/converterhelper.cpp
  28. +69 −0 classes/convert/converterhelper.h
  29. +0 −598 classes/converter.cpp
  30. +0 −338 classes/convertercolor.cpp
  31. +0 −86 classes/convertercolor.h
  32. +0 −241 classes/convertergrayscale.cpp
  33. +0 −63 classes/convertergrayscale.h
  34. +0 −238 classes/convertermono.cpp
  35. +0 −73 classes/convertermono.h
  36. +2 −18 classes/fontcontainer.cpp
  37. +3 −4 classes/fontcontainer.h
  38. +434 −0 classes/parser.cpp
  39. +17 −42 classes/{converter.h → parser.h}
  40. +62 −0 classes/preview-models/matrixitemdelegate.cpp
  41. +8 −16 classes/{bytelistitemdelegate.h → preview-models/matrixitemdelegate.h}
  42. +630 −0 classes/preview-models/matrixpreviewmodel.cpp
  43. +82 −0 classes/preview-models/matrixpreviewmodel.h
  44. +1 −1 classes/recentlist.cpp
  45. +1 −1 classes/recentlist.h
  46. +35 −36 controls/widgetconvoptionsgray.h → classes/revisioninfo.cpp
  47. +9 −26 classes/{bitmapdata.h → revisioninfo.h}
  48. +3 −32 controls/dialogabout.cpp
  49. +2 −2 controls/dialogabout.ui
  50. +0 −242 controls/dialogconvert.cpp
  51. +0 −263 controls/dialogconvert.ui
  52. +19 −0 controls/dialogfontpreview.cpp
  53. +19 −0 controls/dialogfontpreview.h
  54. +3 −3 controls/dialogfontpreview.ui
  55. +6 −2 controls/mainwindow.cpp
  56. +21 −12 controls/mainwindow.ui
  57. +31 −0 controls/revisionlabel.cpp
  58. +37 −0 controls/revisionlabel.h
  59. +729 −0 controls/setup/dialogconvert.cpp
  60. +92 −0 controls/setup/dialogconvert.h
  61. +372 −0 controls/setup/dialogconvert.ui
  62. +100 −0 controls/setup/dialogpreview.cpp
  63. +17 −26 controls/{dialogconvert.h → setup/dialogpreview.h}
  64. +173 −0 controls/setup/dialogpreview.ui
  65. +7 −7 controls/{dialogsetuptemplates.cpp → setup/dialogsetup.cpp}
  66. +8 −8 controls/{dialogsetuptemplates.h → setup/dialogsetup.h}
  67. +5 −5 controls/{dialogsetuptemplates.ui → setup/dialogsetup.ui}
  68. +1 −2 controls/starttab.cpp
  69. +1 −1 controls/starttab.h
  70. +1 −1 controls/starttab.ui
  71. +0 −223 controls/widgetconvoptionscolor.cpp
  72. +0 −226 controls/widgetconvoptionscolor.ui
  73. +0 −193 controls/widgetconvoptionsgray.cpp
  74. +0 −110 controls/widgetconvoptionsgray.ui
  75. +0 −182 controls/widgetconvoptionsmono.cpp
  76. +0 −109 controls/widgetconvoptionsmono.ui
  77. +0 −1 iconrc.rc
  78. +0 −58 interfaces/iconverter.h
  79. +2 −3 interfaces/idatacontainer.h
  80. +54 −37 lcd-image-converter.pro
  81. +38 −32 resources/font.tmpl
  82. BIN resources/icons/lcd-image-converter-64.png
  83. BIN resources/icons/lcd-image-converter-96.png
  84. BIN resources/icons/lcd-image-converter.ico
  85. BIN resources/icons/lcd-image-converter.pdn
  86. BIN resources/icons/pencil.png
  87. BIN resources/icons/{lcd-image-converter.icpr → source/icon.icpr}
  88. +878 −0 resources/icons/source/logo.svg
  89. +28 −23 resources/image.tmpl
  90. +306 −270 resources/lcd-image-converter-ru.ts
  91. +0 −1 resources/resources.qrc
  92. +0 −139 resources/template_keys.txt
  93. +27 −0 tests/maintest.cpp
  94. +75 −0 tests/parts/testbitmaphelper.cpp
  95. +27 −0 tests/parts/testbitmaphelper.h
  96. +100 −0 tests/parts/testbitstream.cpp
  97. +27 −0 tests/parts/testbitstream.h
  98. +224 −0 tests/parts/testconversionmatrix.cpp
  99. +29 −0 tests/parts/testconversionmatrix.h
  100. +369 −0 tests/parts/testconversionmatrixoptions.cpp
  101. +49 −0 tests/parts/testconversionmatrixoptions.h
  102. +306 −0 tests/parts/testconverterhelper.cpp
  103. +32 −0 tests/parts/testconverterhelper.h
  104. BIN tests/resources/samples/flip/flip-horizontal.png
  105. BIN tests/resources/samples/flip/flip-vertical.png
  106. BIN tests/resources/samples/flip/flip.png
  107. BIN tests/resources/samples/rotate/rotate0.png
  108. BIN tests/resources/samples/rotate/rotate180.png
  109. BIN tests/resources/samples/rotate/rotate270.png
  110. BIN tests/resources/samples/rotate/rotate90.png
  111. +13 −0 tests/samples.qrc
  112. +51 −0 tests/test.pro
  113. +3 −0 translation-compile.sh
  114. +1 −1 version-gen.sh
  115. +33 −0 win-res.rc
@@ -14,3 +14,4 @@ moc_*
*.sh
*.qm
version-included.txt
revision.h
@@ -1,3 +1,22 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#include "actionfilehandlers.h"

#include "editortabimage.h"
@@ -8,7 +27,7 @@
#include <QTextStream>
#include <QInputDialog>
#include <QLineEdit>
#include "converter.h"
#include "parser.h"
#include "widgetbitmapeditor.h"
#include "imainwindow.h"
#include "idatacontainer.h"
@@ -83,7 +102,7 @@ void ActionFileHandlers::open_triggered()
dialog.setAcceptMode(QFileDialog::AcceptOpen);
dialog.setFileMode(QFileDialog::ExistingFile);
dialog.setFilter(tr("XML Files (*.xml);;Images (*.bmp *.gif *.jpg *.jpeg *.png *.pbm *.pgm *.ppm *.tiff *.xbm *.xpm)"));
dialog.setWindowTitle(tr("Open file"));
dialog.setWindowTitle(tr("Open xml or image file"));

if (dialog.exec() == QDialog::Accepted)
{
@@ -165,7 +184,10 @@ void ActionFileHandlers::convert_triggered()
if (doc != NULL)
{
QMap<QString, QString> tags;
tags["fileName"] = doc->fileName();
if (!doc->fileName().isEmpty())
tags["fileName"] = doc->fileName();
else
tags["fileName"] = "unknown";
QString docName = doc->documentName();
tags["documentName"] = docName;
docName = docName.remove(QRegExp("\\W", Qt::CaseInsensitive));
@@ -196,8 +218,8 @@ void ActionFileHandlers::convert_triggered()

templateFileName = templateFontFileName;
}
Converter conv(this);
QString result = conv.convert(doc, templateFileName, tags);
Parser parser(this);
QString result = parser.convert(doc, templateFileName, tags);

QFileDialog dialog(this->mMainWindow->parentWidget());
dialog.setAcceptMode(QFileDialog::AcceptSave);
@@ -1,3 +1,22 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#ifndef ACTIONFILEHANDLERS_H
#define ACTIONFILEHANDLERS_H
//-----------------------------------------------------------------------------
@@ -1,3 +1,22 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#include "actionfonthandlers.h"

#include <QFileDialog>
@@ -1,3 +1,22 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#ifndef ACTIONFONTHANDLERS_H
#define ACTIONFONTHANDLERS_H
//-----------------------------------------------------------------------------
@@ -1,3 +1,22 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#include "actionhandlersbase.h"

#include "idocument.h"
@@ -1,3 +1,22 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#ifndef ACTIONHANDLERSBASE_H
#define ACTIONHANDLERSBASE_H
//-----------------------------------------------------------------------------
@@ -1,5 +1,27 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#include "actionhelphandlers.h"

#include <QDesktopServices>
#include <QUrl>

#include "dialogabout.h"
#include "imainwindow.h"
//-----------------------------------------------------------------------------
@@ -14,3 +36,8 @@ void ActionHelpHandlers::about_triggered()
dialog.exec();
}
//-----------------------------------------------------------------------------
void ActionHelpHandlers::wiki_triggered()
{
QDesktopServices::openUrl(QUrl("http://code.google.com/p/lcd-image-converter/w/list", QUrl::TolerantMode));
}
//-----------------------------------------------------------------------------
@@ -1,3 +1,22 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#ifndef ACTIONHELPHANDLERS_H
#define ACTIONHELPHANDLERS_H
//-----------------------------------------------------------------------------
@@ -17,6 +36,7 @@ class ActionHelpHandlers : public ActionHandlersBase

public slots:
void about_triggered();
void wiki_triggered();
};
//-----------------------------------------------------------------------------
#endif // ACTIONHELPHANDLERS_H
@@ -1,3 +1,22 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#include "actionimagehandlers.h"

#include <QFileDialog>
@@ -1,3 +1,22 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#ifndef ACTIONIMAGEHANDLERS_H
#define ACTIONIMAGEHANDLERS_H
//-----------------------------------------------------------------------------
@@ -1,6 +1,25 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#include "actionsetuphandlers.h"

#include "dialogsetuptemplates.h"
#include "dialogsetup.h"
#include "dialogconvert.h"
#include "widgetbitmapeditor.h"
#include "imainwindow.h"
@@ -20,9 +39,9 @@ void ActionSetupHandlers::conversion_triggered()
dialog.exec();
}
//-----------------------------------------------------------------------------
void ActionSetupHandlers::templates_triggered()
void ActionSetupHandlers::setup_triggered()
{
DialogSetupTemplates dialog(this->mMainWindow->parentWidget());
DialogSetup dialog(this->mMainWindow->parentWidget());
dialog.exec();
}
//-----------------------------------------------------------------------------
@@ -1,3 +1,22 @@
/*
* LCD Image Converter. Converts images and fonts for embedded applciations.
* Copyright (C) 2012 riuson
* mailto: riuson@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/
*/

#ifndef ACTIONSETUPHANDLERS_H
#define ACTIONSETUPHANDLERS_H
//-----------------------------------------------------------------------------
@@ -17,7 +36,7 @@ class ActionSetupHandlers : public ActionHandlersBase

public slots:
void conversion_triggered();
void templates_triggered();
void setup_triggered();
};
//-----------------------------------------------------------------------------
#endif // ACTIONSETUPHANDLERS_H
@@ -39,7 +39,7 @@ BitmapContainer::~BitmapContainer()
delete this->mImage;
}
//-----------------------------------------------------------------------------
QImage *BitmapContainer::image(const QString &key)
QImage *BitmapContainer::image(const QString &key) const
{
Q_UNUSED(key);
return this->mImage;
@@ -55,19 +55,7 @@ void BitmapContainer::setImage(const QString &key, QImage *image)
emit this->imageChanged("default");
}
//-----------------------------------------------------------------------------
void BitmapContainer::transform(const QString &key, int code)
{
Q_UNUSED(key);
BitmapHelper::BitmapHelperTransformCodes type = (BitmapHelper::BitmapHelperTransformCodes)code;
QImage result = BitmapHelper::transform(type, this->mImage);
if (this->mImage != NULL)
delete this->mImage;
this->mImage = new QImage(result);

emit this->imageChanged("default");
}
//-----------------------------------------------------------------------------
int BitmapContainer::count()
int BitmapContainer::count() const
{
return 1;
}
Oops, something went wrong.

0 comments on commit be13e6f

Please sign in to comment.