Permalink
Please sign in to comment.
Browse files
Fixed:
Bug when editing template file paths; A grid in the font preview dialog restored. Added: Reordering bits; Scanning of the bands; Scaling by mouse wheel + Ctrl.
- Loading branch information...
Showing
with
2,265 additions
and 86 deletions.
- +112 −15 classes/convert/converterhelper.cpp
- +6 −0 classes/convert/converterhelper.h
- +19 −0 classes/data/historykeeper.cpp
- +19 −0 classes/data/historykeeper.h
- +19 −0 classes/data/historyrecord.cpp
- +19 −0 classes/data/historyrecord.h
- +29 −13 classes/parser.cpp
- +63 −0 classes/preview-models/reorderingitemdelegate.cpp
- +39 −0 classes/preview-models/reorderingitemdelegate.h
- +307 −0 classes/preview-models/reorderingpreviewmodel.cpp
- +75 −0 classes/preview-models/reorderingpreviewmodel.h
- +41 −0 classes/settings/presets/prepareoptions.cpp
- +6 −0 classes/settings/presets/prepareoptions.h
- +25 −11 classes/settings/presets/preset.cpp
- +3 −0 classes/settings/presets/preset.h
- +169 −0 classes/settings/presets/reorderingoptions.cpp
- +55 −0 classes/settings/presets/reorderingoptions.h
- +1 −0 controls/dialogfontpreview.cpp
- +10 −5 controls/setup/dialogoptions.cpp
- +7 −5 controls/setup/dialogoptions.h
- +15 −11 controls/setup/dialogpreview.cpp
- +18 −0 controls/setup/parts/setuptabprepare.cpp
- +2 −0 controls/setup/parts/setuptabprepare.h
- +24 −1 controls/setup/parts/setuptabprepare.ui
- +257 −0 controls/setup/parts/setuptabreordering.cpp
- +61 −0 controls/setup/parts/setuptabreordering.h
- +43 −0 controls/setup/parts/setuptabreordering.ui
- +6 −2 controls/setup/parts/setuptabtemplates.cpp
- +2 −2 controls/setup/parts/setuptabtemplates.h
- +44 −4 controls/widgetbitmapeditor.cpp
- +2 −0 controls/widgetbitmapeditor.h
- +12 −3 lcd-image-converter.pro
- BIN resources/demos/scanning_band.png
- +394 −0 resources/demos/scanning_band.svg
- +20 −0 resources/history.xml
- +83 −12 resources/lcd-image-converter-ru.ts
- +1 −0 resources/resources.qrc
- +4 −0 tests/maintest.cpp
- +27 −0 tests/parts/testprepareoptions.cpp
- +2 −0 tests/parts/testprepareoptions.h
- +6 −0 tests/parts/testpresets.cpp
- +181 −0 tests/parts/testreorderingoptions.cpp
- +31 −0 tests/parts/testreorderingoptions.h
- +6 −2 tests/test.pro
@@ -0,0 +1,63 @@ | |||
/* | |||
* LCD Image Converter. Converts images and fonts for embedded applications. | |||
* Copyright (C) 2013 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 "reorderingitemdelegate.h" | |||
//----------------------------------------------------------------------------- | |||
ReorderingItemDelegate::ReorderingItemDelegate(QObject *parent) : | |||
QItemDelegate(parent) | |||
{ | |||
this->mColor= QColor("gold"); | |||
} | |||
//----------------------------------------------------------------------------- | |||
void ReorderingItemDelegate::paint(QPainter *painter, | |||
const QStyleOptionViewItem &option, | |||
const QModelIndex &index) const | |||
{ | |||
if (index.isValid()) | |||
{ | |||
int rows = index.model()->rowCount(); | |||
QRect rect = option.rect; | |||
int row = index.row(); | |||
if (row == 0) | |||
{ | |||
//painter->setPen(this->mColorOdd); | |||
QPen pen(QBrush(this->mColor), 3); | |||
painter->setPen(pen); | |||
painter->drawLine(rect.left(), rect.bottom() - 1, rect.right(), rect.bottom() - 1); | |||
} | |||
if (row == rows - 1) | |||
{ | |||
QPen pen(QBrush(this->mColor), 3); | |||
painter->setPen(pen); | |||
painter->drawLine(rect.left(), rect.top() + 1, rect.right(), rect.top() + 1); | |||
} | |||
} | |||
QItemDelegate::paint(painter, option, index); | |||
} | |||
//----------------------------------------------------------------------------- | |||
QColor ReorderingItemDelegate::color() const | |||
{ | |||
return this->mColor; | |||
} | |||
//----------------------------------------------------------------------------- | |||
void ReorderingItemDelegate::setColor(const QColor &value) | |||
{ | |||
this->mColor = value; | |||
} | |||
//----------------------------------------------------------------------------- |

Oops, something went wrong.
0 comments on commit
4e8c626