Permalink
Browse files

Added Unicode blocks;

Added new tag names;
Changed 'Resize' dialog;
Font preview's size can be changed by Ctrl+Wheel;
Added a separate dialog box to check for updates;

Merge branch 'develop'
  • Loading branch information...
riuson committed Feb 10, 2013
2 parents 4e8c626 + cbfe170 commit e3845185e979677235a2d12243b675b96ce225c6
Showing with 4,396 additions and 1,940 deletions.
  1. +22 −2 classes/action-handlers/actionfilehandlers.cpp
  2. +40 −44 classes/action-handlers/actionfonthandlers.cpp
  3. +7 −0 classes/action-handlers/actionhelphandlers.cpp
  4. +3 −2 classes/action-handlers/actionhelphandlers.h
  5. +283 −75 classes/action-handlers/actionimagehandlers.cpp
  6. +3 −0 classes/action-handlers/actionimagehandlers.h
  7. +19 −0 classes/compression/rlecompressor.cpp
  8. +19 −0 classes/compression/rlecompressor.h
  9. +6 −1 classes/data/datacontainer.cpp
  10. +1 −1 classes/data/datacontainer.h
  11. +369 −0 classes/data/imagesmodel.cpp
  12. +35 −7 classes/{fontcharactersmodel.h → data/imagesmodel.h}
  13. 0 classes/{ → data}/revisioninfo.cpp
  14. 0 classes/{ → data}/revisioninfo.h
  15. +0 −137 classes/fontcharactersmodel.cpp
  16. +0 −498 classes/parser.cpp
  17. +30 −2 classes/{ → parser}/convert/bitmaphelper.cpp
  18. +1 −0 classes/{ → parser}/convert/bitmaphelper.h
  19. 0 classes/{ → parser}/convert/bitstream.cpp
  20. 0 classes/{ → parser}/convert/bitstream.h
  21. 0 classes/{ → parser}/convert/conversion_options.h
  22. +1 −1 classes/{ → parser}/convert/converterhelper.cpp
  23. +1 −1 classes/{ → parser}/convert/converterhelper.h
  24. 0 classes/{ → parser}/convert/fonthelper.cpp
  25. 0 classes/{ → parser}/convert/fonthelper.h
  26. +442 −0 classes/parser/parser.cpp
  27. +10 −16 classes/{ → parser}/parser.h
  28. +186 −0 classes/parser/tags.cpp
  29. +105 −0 classes/parser/tags.h
  30. +45 −0 classes/settings/fonteditoroptions.cpp
  31. +33 −0 classes/settings/fonteditoroptions.h
  32. +45 −0 classes/settings/resizesettings.cpp
  33. +33 −0 classes/settings/resizesettings.h
  34. +48 −0 classes/status/statusdata.cpp
  35. +56 −0 classes/status/statusdata.h
  36. +142 −0 classes/status/statusmanager.cpp
  37. +54 −0 classes/status/statusmanager.h
  38. +78 −0 controls/about/dialogabout.cpp
  39. +43 −0 controls/about/dialogabout.h
  40. +2 −11 controls/{ → about}/dialogabout.ui
  41. +0 −28 controls/dialogexternaleditor.h
  42. +0 −101 controls/dialogresize.cpp
  43. +0 −58 controls/dialogresize.h
  44. +0 −271 controls/dialogresize.ui
  45. 0 controls/{ → fonts/font-changed}/dialogfontchanged.cpp
  46. 0 controls/{ → fonts/font-changed}/dialogfontchanged.h
  47. 0 controls/{ → fonts/font-changed}/dialogfontchanged.ui
  48. +210 −74 controls/{ → fonts/font-editor}/editortabfont.cpp
  49. +20 −10 controls/{ → fonts/font-editor}/editortabfont.h
  50. 0 controls/{ → fonts/font-editor}/editortabfont.ui
  51. +47 −4 {classes → controls/fonts/font-new}/charactersmodel.cpp
  52. +10 −0 {classes → controls/fonts/font-new}/charactersmodel.h
  53. +52 −2 controls/{ → fonts/font-new}/dialogfontselect.cpp
  54. +6 −0 controls/{ → fonts/font-new}/dialogfontselect.h
  55. +33 −2 controls/{ → fonts/font-new}/dialogfontselect.ui
  56. +47 −0 controls/fonts/font-new/unicodeblocksfiltermodel.cpp
  57. +43 −0 controls/fonts/font-new/unicodeblocksfiltermodel.h
  58. +129 −0 controls/fonts/font-new/unicodeblocksmodel.cpp
  59. +64 −0 controls/fonts/font-new/unicodeblocksmodel.h
  60. 0 controls/{ → fonts/font-preview}/dialogfontpreview.cpp
  61. 0 controls/{ → fonts/font-preview}/dialogfontpreview.h
  62. 0 controls/{ → fonts/font-preview}/dialogfontpreview.ui
  63. +75 −25 controls/{ → images}/editortabimage.cpp
  64. +11 −3 controls/{ → images}/editortabimage.h
  65. 0 controls/{ → images}/editortabimage.ui
  66. +30 −13 controls/{ → images}/widgetbitmapeditor.cpp
  67. +11 −4 controls/{ → images}/widgetbitmapeditor.h
  68. +0 −10 controls/{ → images}/widgetbitmapeditor.ui
  69. +30 −2 controls/{ → main}/mainwindow.cpp
  70. +4 −0 controls/{ → main}/mainwindow.h
  71. +7 −1 controls/{ → main}/mainwindow.ui
  72. 0 controls/{ → main}/revisionlabel.cpp
  73. 0 controls/{ → main}/revisionlabel.h
  74. +131 −0 controls/resize/dialogcanvasresize.cpp
  75. +65 −0 controls/resize/dialogcanvasresize.h
  76. +201 −0 controls/resize/dialogcanvasresize.ui
  77. +52 −0 controls/resize/imagesfilterproxy.cpp
  78. +43 −0 controls/resize/imagesfilterproxy.h
  79. 0 controls/{ → save-changes}/dialogsavechanges.cpp
  80. 0 controls/{ → save-changes}/dialogsavechanges.h
  81. 0 controls/{ → save-changes}/dialogsavechanges.ui
  82. +19 −0 controls/{ → setup}/dialogexternaleditor.cpp
  83. +47 −0 controls/setup/dialogexternaleditor.h
  84. 0 controls/{ → setup}/dialogexternaleditor.ui
  85. 0 controls/setup/parts/{ → font}/setuptabfont.cpp
  86. 0 controls/setup/parts/{ → font}/setuptabfont.h
  87. 0 controls/setup/parts/{ → font}/setuptabfont.ui
  88. 0 controls/setup/parts/{ → image}/setuptabimage.cpp
  89. 0 controls/setup/parts/{ → image}/setuptabimage.h
  90. 0 controls/setup/parts/{ → image}/setuptabimage.ui
  91. 0 {classes/preview-models → controls/setup/parts/matrix}/matrixitemdelegate.cpp
  92. 0 {classes/preview-models → controls/setup/parts/matrix}/matrixitemdelegate.h
  93. 0 {classes/preview-models → controls/setup/parts/matrix}/matrixpreviewmodel.cpp
  94. 0 {classes/preview-models → controls/setup/parts/matrix}/matrixpreviewmodel.h
  95. 0 controls/setup/parts/{ → matrix}/setuptabmatrix.cpp
  96. 0 controls/setup/parts/{ → matrix}/setuptabmatrix.h
  97. 0 controls/setup/parts/{ → matrix}/setuptabmatrix.ui
  98. 0 controls/setup/parts/{ → prepare}/setuptabprepare.cpp
  99. 0 controls/setup/parts/{ → prepare}/setuptabprepare.h
  100. 0 controls/setup/parts/{ → prepare}/setuptabprepare.ui
  101. 0 {classes/preview-models → controls/setup/parts/reordering}/reorderingitemdelegate.cpp
  102. 0 {classes/preview-models → controls/setup/parts/reordering}/reorderingitemdelegate.h
  103. 0 {classes/preview-models → controls/setup/parts/reordering}/reorderingpreviewmodel.cpp
  104. 0 {classes/preview-models → controls/setup/parts/reordering}/reorderingpreviewmodel.h
  105. 0 controls/setup/parts/{ → reordering}/setuptabreordering.cpp
  106. 0 controls/setup/parts/{ → reordering}/setuptabreordering.h
  107. 0 controls/setup/parts/{ → reordering}/setuptabreordering.ui
  108. 0 controls/setup/parts/{ → templates}/setuptabtemplates.cpp
  109. 0 controls/setup/parts/{ → templates}/setuptabtemplates.h
  110. 0 controls/setup/parts/{ → templates}/setuptabtemplates.ui
  111. 0 controls/{ → start}/starttab.cpp
  112. 0 controls/{ → start}/starttab.h
  113. 0 controls/{ → start}/starttab.ui
  114. +20 −59 controls/{dialogabout.cpp → updates/dialogupdates.cpp}
  115. +9 −11 controls/{dialogabout.h → updates/dialogupdates.h}
  116. +84 −0 controls/updates/dialogupdates.ui
  117. +5 −2 interfaces/idocument.h
  118. +162 −120 lcd-image-converter.pro
  119. +26 −25 resources/font.tmpl
  120. +19 −1 resources/history.xml
  121. +15 −15 resources/image.tmpl
  122. +277 −294 resources/lcd-image-converter-ru.ts
  123. +3 −0 resources/resources.qrc
  124. +220 −0 resources/unicode_blocks.txt
  125. +7 −7 tests/test.pro
@@ -268,7 +268,17 @@ void ActionFileHandlers::openFile(const QString &filename)

QString name = this->mMainWindow->findAvailableName(info.baseName());

ed->setImage(&image);
// assign image
{
QStringList keys = ed->selectedKeys();

QStringListIterator iterator(keys);
while (iterator.hasNext())
{
QString key = iterator.next();
ed->dataContainer()->setImage(key, &image);
}
}

ed->setDocumentName(name);
ed->setChanged(false);
@@ -285,7 +295,17 @@ void ActionFileHandlers::openImage(QImage *image, const QString &documentName)

QString name = this->mMainWindow->findAvailableName(documentName);

ed->setImage(image);
// assign image
{
QStringList keys = ed->selectedKeys();

QStringListIterator iterator(keys);
while (iterator.hasNext())
{
QString key = iterator.next();
ed->dataContainer()->setImage(key, image);
}
}

ed->setDocumentName(name);
ed->setChanged(true);
@@ -22,7 +22,6 @@
#include <QFileDialog>
#include <QFileInfo>
#include "widgetbitmapeditor.h"
#include "dialogresize.h"
#include "bitmaphelper.h"
#include "fonthelper.h"
#include "editortabfont.h"
@@ -33,6 +32,7 @@
#include "datacontainer.h"
#include "limits"
#include "bitmapeditoroptions.h"
#include "dialogcanvasresize.h"
//-----------------------------------------------------------------------------
ActionFontHandlers::ActionFontHandlers(QObject *parent) :
ActionHandlersBase(parent)
@@ -104,34 +104,34 @@ void ActionFontHandlers::fontInverse_triggered()
//-----------------------------------------------------------------------------
void ActionFontHandlers::fontResize_triggered()
{
IDocument *doc = this->document();
if (doc != NULL)
if (this->document() != NULL)
{
const QImage *original = doc->dataContainer()->image(doc->dataContainer()->keys().at(0));
QStringList keys = this->document()->dataContainer()->keys();

DialogCanvasResize dialog(this->document()->dataContainer(), this->mMainWindow->parentWidget());
dialog.selectKeys(keys);

DialogResize dialog(original->width(), original->height(), 0, 0, true, true, false, this->mMainWindow->parentWidget());
if (dialog.exec() == QDialog::Accepted)
{
int width, height, offsetX, offsetY;
bool center, changeWidth, changeHeight;
dialog.getResizeInfo(&width, &height, &offsetX, &offsetY, &center, &changeWidth, &changeHeight);

this->document()->beginChanges();
int left, top, right, bottom;
dialog.resizeInfo(&left, &top, &right, &bottom);

QStringList keys = this->document()->dataContainer()->keys();
QListIterator<QString> it(keys);
it.toFront();
while (it.hasNext())
if (left != 0 || top != 0 || right != 0 || bottom != 0)
{
QString key = it.next();
original = doc->dataContainer()->image(key);
this->document()->beginChanges();

QImage result = BitmapHelper::resize(original, width, height, offsetX, offsetY, center, changeWidth, changeHeight, BitmapEditorOptions::color2());
QStringListIterator iterator(keys);
while (iterator.hasNext())
{
QString key = iterator.next();

doc->dataContainer()->setImage(key, &result);
}
const QImage *original = this->document()->dataContainer()->image(key);
QImage result = BitmapHelper::crop(original, left, top, right, bottom, BitmapEditorOptions::color2());
this->document()->dataContainer()->setImage(key, &result);
}

this->document()->endChanges();
this->document()->endChanges();
}
}
}
}
@@ -146,8 +146,6 @@ void ActionFontHandlers::fontMinimizeHeight_triggered()
int right = 0;
int bottom = 0;
int l, t, r, b;
int width = 0;
int height = 0;

// find limits
QStringList keys = doc->dataContainer()->keys();
@@ -162,36 +160,32 @@ void ActionFontHandlers::fontMinimizeHeight_triggered()

left = qMin(left, l);
top = qMin(top, t);
right = qMax(right, r);
bottom = qMax(bottom, b);

width = qMax(width, original->width());
height = qMax(height, original->height());
right = qMin(right, r);
bottom = qMin(bottom, b);
}

DialogResize dialog(width, bottom + 1 - top, 0, -top, false, false, true, this->mMainWindow->parentWidget());
DialogCanvasResize dialog(this->document()->dataContainer(), this->mMainWindow->parentWidget());
dialog.setResizeInfo(left, top, right, bottom);
if (dialog.exec() == QDialog::Accepted)
{
int width, height, offsetX, offsetY;
bool center, changeWidth, changeHeight;
dialog.getResizeInfo(&width, &height, &offsetX, &offsetY, &center, &changeWidth, &changeHeight);

this->document()->beginChanges();
dialog.resizeInfo(&left, &top, &right, &bottom);

QStringList keys = doc->dataContainer()->keys();
QListIterator<QString> it(keys);
it.toFront();
while (it.hasNext())
if (left != 0 || top != 0 || right != 0 || bottom != 0)
{
QString key = it.next();
const QImage *original = doc->dataContainer()->image(key);
this->document()->beginChanges();

QImage result = BitmapHelper::resize(original, original->width(), height, width, offsetY, center, changeWidth, changeHeight, BitmapEditorOptions::color2());
QStringListIterator iterator(keys);
while (iterator.hasNext())
{
QString key = iterator.next();

doc->dataContainer()->setImage(key, &result);
}
const QImage *original = this->document()->dataContainer()->image(key);
QImage result = BitmapHelper::crop(original, left, top, right, bottom, BitmapEditorOptions::color2());
this->document()->dataContainer()->setImage(key, &result);
}

this->document()->endChanges();
this->document()->endChanges();
}
}
}
}
@@ -215,7 +209,9 @@ void ActionFontHandlers::fontToImage_triggered()
EditorTabFont *editor = qobject_cast<EditorTabFont *>(this->mMainWindow->currentTab());
if (editor != NULL)
{
QString characters = editor->selectedCharacters();
QStringList keys = this->document()->selectedKeys();
qSort(keys);
QString characters = keys.join("");
QImage image = FontHelper::drawString(editor->dataContainer(), characters);

emit this->imageCreated(&image, "image_" + editor->documentName());
@@ -23,6 +23,7 @@
#include <QUrl>

#include "dialogabout.h"
#include "dialogupdates.h"
#include "imainwindow.h"
//-----------------------------------------------------------------------------
ActionHelpHandlers::ActionHelpHandlers(QObject *parent) :
@@ -36,6 +37,12 @@ void ActionHelpHandlers::about_triggered()
dialog.exec();
}
//-----------------------------------------------------------------------------
void ActionHelpHandlers::updates_triggered()
{
DialogUpdates dialog(this->mMainWindow->parentWidget());
dialog.exec();
}
//-----------------------------------------------------------------------------
void ActionHelpHandlers::wiki_triggered()
{
QDesktopServices::openUrl(QUrl("http://code.google.com/p/lcd-image-converter/w/list", QUrl::TolerantMode));
@@ -31,11 +31,12 @@ class ActionHelpHandlers : public ActionHandlersBase
Q_OBJECT
public:
explicit ActionHelpHandlers(QObject *parent = 0);

signals:

public slots:
void about_triggered();
void updates_triggered();
void wiki_triggered();
};
//-----------------------------------------------------------------------------
Oops, something went wrong.

0 comments on commit e384518

Please sign in to comment.