Skip to content

Commit

Permalink
0.6
Browse files Browse the repository at this point in the history
Migration to Qt5
  • Loading branch information
zvezdochiot committed Oct 14, 2018
1 parent 2ff76dd commit 99c2b6d
Show file tree
Hide file tree
Showing 83 changed files with 4,574 additions and 2,175 deletions.
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ for full information on how to scan with digital cameras.

LICENSE
-------
yasw is licenced under GPLv3.
YASW is licenced under GPLv3.
=> See documentation/gpl.txt for details.

yasw uses icons fron the Tango Theme, which are in the public domain.
Expand All @@ -20,4 +20,4 @@ yasw uses icons fron the Tango Theme, which are in the public domain.

DOWNLOAD
--------
You can download yasw from https://sourceforge.net/projects/yascanw/
You can download YASW from https://sourceforge.net/projects/yascanw/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
64 changes: 13 additions & 51 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,54 +1,16 @@
ToDo / Roadmap
- adapt pdf export
- separate scaling filter from layout filter -> one may want to sets the settings differently (typicaly layout for all images)
- checking "preview" on scaling widget does not calculate image
- optimise YASW: selecting another (big) image lasts 1 second.
o when loading a project, recalculate is called a lot of times. This should not be!
o when inserting an image, recalclate ist called twice. This should not be!
- scaling filter: add padding sizes and/or page size
- Filter to fix image color / convert to black & white...
o add filter for color manipulation_/adjustment
o point to white pixel (or many white pixels)
- BUG: png images can't export to jpg!
- png images do not scale well
- handle empty images (placeholder) differently
- Load images for Icons in background
- Implement disable filter
o disabling a filter (UI) should disable the rendering.
- progress dialog while exporting / loading
- Display page preview instead of original image in image list
- drag and drop in the image list
- error message on console: kfilemodule(5761)/kio (KDirModel)
KDirModelPrivate::_k_slotDeleteItems: No node found for item that was just
removed: KUrl("file:(((...")
- windows port: security credentials (producer...)
- add a placeholder at the end of the imagetablewidget, so that can insert an image at the end and
insert an image on the right when there is no image in the list.
- Application Icon for YASW
- autocalibration with a printed grid (line detection)
o have a look at ppmunwarp http://diybookscanner.org/forum/viewtopic.php?f=19&t=2589
- move image from left ro right
- centralized .h header with includes and default values.
User requests:
- Add the ability to take a checkerboard pattern as input to the de-warping stage.
- A way to measure DPI in-situ. Allow the user to draw a line on the pic and inform yasw that the
actual physical length of this line is x. You could then compute DPI by measuring the length of
the drawn line in pixels and divide by length input.
o I assume you would calculate DPI on the cropped image. In that case, use the DPI to also
calculate and display the physical dimensions of the page or a sub-set of the page as selected
by a user-defined bounding box.
- Under rotation filter, allow user to draw a line to indicate what is 'horizontal' - (maybe even
use 'Shift' key to force a horizontal line, i.e. deltaY = 0) Use the drawn line to calculate a
finer rotation angle to straighten the page. (maybe name the two filters 'orientation' and 'rotation'
to distinguish between them).
-- when I rotate the page, seeing the thumbnail rotated as well.
-- being able to "arrow down" through the pages quickly, viewing previews.
-- When I exported to PDF, though, the app exported all the Left images, followed by (most of) the
"right" images. It should alternate L/R, obviously. Also, I'm getting a white border on the top
and the left of the images; I don't know if that's intentional or not, but I'd like to be able
to turn it off.
20141218; YASW 0.6
- Progress dialogs for long operations
- Performance optimisation (calculate only when seen on screen or exporting) & bug fixes
- Removed doxygen documentation as it is not complete. I will comment in the source as much as possible, but
without the doxygen format.
- XML Project Files (.yasw) Closes #22 and #25 as a side effect (Loading Project messes up file order)
- Scaling filter splitted in two - Fixes #19
- Checkbox "Enable Filter" works now - Fixes #27
- Changes are now only propagated when a user selects the according button, to avoid unwanted propagations. Fixes #24
- Migration to Qt5
- Progress bar when adding multiple images (Fixes #29)

20130629; YASW 0.5 "release few but release often"
20130629; YASW 0.5
- Key shortcuts
- Redesign of the Scaling Filter Widget
- New policies for propagating changes. I'm not 100% happy as this is quite
Expand All @@ -69,7 +31,7 @@ User requests:
- Scaling filter
- Improve PDF Export (a lot!)

20130525; YASW 0.3 "yasw has reached one (1) user!"
20130525; YASW 0.3
- About dialog
- open -> recent projects
- change selection color for dekeystoning and cropping
Expand Down
21 changes: 21 additions & 0 deletions developpers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Implement your own filter
-------------------------
In order develop your own filter, you have to create a class that inherits from BaseFilter and reimplement at least:

public:
<Constructor>(QObject * parent = 0);
QString getIdentifier();
QString getName();
QMap<QString, QVariant> getSettings();
void setSettings(QMap <QString, QVariant> settings);
protected:
void compute();

This class should provide a Widget that implements the AbstractFilterWidget. The inherited methods (getWidget) from
the BaseFilter don't need to be reimplemented in most cases.

Each Filter should be placed somewhere appropiate under the filter folder. The name of the classes and files should
beginn with the filer name as in getIdentifier().
If you create a new folder, don't forget to modifiy the INCLUDEPATH in yasw.pro.

Have a look at the BaseFilter and the Rotation class (folder filter/rotation) for simple filter example.
27 changes: 7 additions & 20 deletions install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ is welcome!

Complile YASW
-------------
Prerequisite to build YASW is the Qt-Plateform.
Prerequisite to build YASW is the Qt5-Plateform.
$ cd src
$ qmake
$ make
Expand All @@ -22,28 +22,15 @@ Run YASW
After compiling YASW, just go into src and run "yasw", on linux:
./yasw

Build YASW Developer-Documentation
----------------------------------
$ cd documentation
$ make


How to Release
--------------
#######################
# Prepare Release
#######################
- edit changelog (name release)
- update version in yasw.pro
- edit changelog
- update version in constants.h
- make distclean working repository, rebuild in release, extensive test
- insert images left and right
- move images
- delete images
- save project
- close project
- open saved project
- export to jpg
- export to pdf
- cross-compile to windows, small test
- insert images
- export to pdf
Expand All @@ -52,7 +39,7 @@ How to Release
# Build source tarball
#######################
# Tag the git repository
VERSION=0.5
VERSION=0.6
git tag -a yasw_${VERSION} -m "YASW version ${VERSION}"
# build the tarball (note: it contains files like .gitignore...)
git archive --prefix=yasw_${VERSION}/ yasw_${VERSION} | gzip > ../yasw_${VERSION}.tgz
Expand All @@ -66,16 +53,16 @@ git push --tags
# Preparation: follow steps 1; 3; 4; 5c on http://mxe.cc/#tutorial :
git clone -b stable https://github.com/mxe/mxe.git
cd mxe
make qt
make qtsvg
export PATH=/where MXE is installed/usr/bin:$PATH
# Cross-compile YASW:
cd <path to yasw root folder>
mkdir windows-build
cd windows-build
i686-pc-mingw32-qmake ../src/yasw.pro CONFIG+=static
/where MXE is installed/usr/i686-pc-mingw32/qt5/bin/qmake ../src/yasw.pro CONFIG+=static
make
# build archive
VERSION=0.5
VERSION=0.6
mkdir yasw_${VERSION}_Windows
cp release/yasw.exe yasw_${VERSION}_Windows/
cp ../README yasw_${VERSION}_Windows/
Expand Down
50 changes: 50 additions & 0 deletions src/constants.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright (C) 2014 Robert Chéramy ([email protected])
*
* This file is part of YASW (Yet Another Scan Wizard).
*
* YASW 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.
*
* YASW 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 YASW. If not, see <http://www.gnu.org/licenses/>.
*/

#include "constants.h"

QStringList Constants::displayUnits = QStringList() << "pixel"
<< "milimeter"
<< "inch";
QStringList Constants::dpiList = QStringList() << "150"
<< "300"
<< "600";

qreal const Constants::milimeterPerInch = 25.4; // 1 inch = 25,4 mm


QStringList Constants::horizontalAlignment = QStringList() << "Left"
<< "Center"
<< "Right";
QStringList Constants::verticalAlignment = QStringList() << "Top"
<< "Center"
<< "Bottom";

QRegExp Constants::trailZero = QRegExp("0+$");
QRegExp Constants::trailDot = QRegExp("\\.$");


QString Constants::float2String(qreal n, int precision)
{
QString str = QString::number(n, 'f', precision);
str.remove(trailZero);
str.remove(trailDot);

return str;
}
55 changes: 55 additions & 0 deletions src/constants.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright (C) 2014 Robert Chéramy ([email protected])
*
* This file is part of YASW (Yet Another Scan Wizard).
*
* YASW 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.
*
* YASW 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 YASW. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONSTANTS_H
#define CONSTANTS_H

#include <QStringList>
// QDebug included centraly, so that it can be commented out.
#include <QDebug>

static const char VERSION[] = "0.6";


class Constants
{
public:
static QStringList displayUnits;
static QStringList dpiList;
static qreal const milimeterPerInch ; //= 25.4;

static int const MIN_DPI = 10;
static int const DEFAULT_DPI = 300;

// Constants for Layout Filter & Widget
enum horizintalAlignmentEnum {LeftHAlignment, CenterHAlignment, RightHAlignment};
enum verticalAlignmentEnum {TopVAlignment, CenterVAlignment, BottomVAlignment};
static QStringList horizontalAlignment;
static QStringList verticalAlignment;

static QString float2String(qreal n, int precision = 2);

private:
// Code optimisation: define these QRegExp once and loading a project is much faster.
static QRegExp trailZero;
static QRegExp trailDot;
};



#endif // CONSTANTS_H
23 changes: 2 additions & 21 deletions src/filter/abstractfilterwidget.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2012 Robert Chéramy ([email protected])
* Copyright (C) 2012-2014 Robert Chéramy ([email protected])
*
* This file is part of YASW (Yet Another Scan Wizard).
*
Expand All @@ -18,29 +19,9 @@
*/
#include "abstractfilterwidget.h"

/** \class FilterWidget
\brief An abstract class for all Filter Widgets.
NOTE: The class ist not really abstract anymore as is provides a basic implementation.

This abstract class describes the members a Filter Widget must have.
It has to be inherited by all Filter Widgets.
*/

AbstractFilterWidget::AbstractFilterWidget(QWidget *parent) :
QWidget(parent)
{
}

/** \brief Sets the input pixmap
*/
void AbstractFilterWidget::setPixmap(QPixmap pixmap)
{
inputPixmap = pixmap;
}

/** \brief Sets the filtered pixmap for preview */
void AbstractFilterWidget::setPreview(QPixmap pixmap)
{
previewPixmap = pixmap;
}
33 changes: 28 additions & 5 deletions src/filter/abstractfilterwidget.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2012 Robert Chéramy ([email protected])
* Copyright (C) 2012-2014 Robert Chéramy ([email protected])
*
* This file is part of YASW (Yet Another Scan Wizard).
*
Expand All @@ -21,17 +21,40 @@

#include <QWidget>


/* An abstract class for all Filter Widgets.
This abstract class describes the members a Filter Widget must have.
It has to be inherited by all Filter Widgets.
A Filter Widget must provide a way to
setPixmap - set the input image (for displaying it)
setPreview - set the output image (for previewing the result)
preview - inform if the preview is active
parameterChanged - inform if parameter have been changed in the widget
*/


class AbstractFilterWidget : public QWidget
{
Q_OBJECT
public:
AbstractFilterWidget(QWidget *parent = 0);
//! \brief Sets the input pixmap
virtual void setPixmap(QPixmap pixmap);
//! \brief Sets the filtered pixmap for preview */
virtual void setPreview(QPixmap pixmap);
// Sets the input pixmap
virtual void setPixmap(QPixmap pixmap) = 0;
// Sets the output pixmap for preview
virtual void setPreview(QPixmap pixmap) = 0;
// true if preview is active
virtual bool preview() = 0;
virtual void enableFilter(bool enable) = 0;
protected:
QPixmap inputPixmap;
QPixmap previewPixmap;
signals:
void parameterChanged();
void enableFilterToggled(bool checked);
void previewChecked();

};

#endif // ABSTRACTFILTERWIDGET_H
Loading

0 comments on commit 99c2b6d

Please sign in to comment.