summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Mi <codeminister@publicstatic.de>2014-01-26 18:05:25 (GMT)
committerGregor Mi <codeminister@publicstatic.de>2014-01-26 18:05:25 (GMT)
commitf586c4ef9200b217e869605fbf4b026cf669b73d (patch)
tree900e43cfcc9302c27381a431b78eef4623d4f7f8
parent06ba636dd6b220a5e0f5e49c5e706fbe1e2a81e4 (diff)
more porting
-rw-r--r--CMakeLists.txt25
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/ImageViewer.cpp14
-rw-r--r--src/KSaneImageSaver.cpp7
-rw-r--r--src/SaveLocation.cpp10
-rw-r--r--src/SaveLocation.ui16
-rw-r--r--src/TODO5
-rw-r--r--src/main.cpp6
-rw-r--r--src/settings.ui11
-rw-r--r--src/skanlite.cpp108
10 files changed, 113 insertions, 95 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 745d764..4e2b428 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,18 +27,6 @@ remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
set(KF5_VERSION "5.0.0")
-find_package(KF5 ${KF5_VERSION} REQUIRED
- COMPONENTS # alias to find_package(KFGuiAddons ${KF5_VERSION} REQUIRED)
- CoreAddons
- GuiAddons
- I18n
- Wallet # FIXME KF5 why is this needed?
- PrintUtils # FIXME KF5 why is this needed?
- DocTools # yields kdoctools_create_handbook
- Sane # will find KF5Sane
- KDE4Support # FIXME KF5 remove later
-)
-
ecm_setup_version(
${KF5_VERSION}
VARIABLE_PREFIX SKANLITE
@@ -57,7 +45,18 @@ set(SKANLITE_VERSION_STRING "1.1.0")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/version.h)
-# TODO: Add all required find_package() calls here
+find_package(KF5 ${KF5_VERSION} REQUIRED
+ COMPONENTS # alias to find_package(KFGuiAddons ${KF5_VERSION} REQUIRED)
+ CoreAddons
+ GuiAddons
+ I18n
+ Wallet # FIXME KF5 minor: why is this needed?
+ XmlGui
+ KIO # contains the KIOWidgets which we use in target_link_libraries
+ PrintUtils # FIXME KF5 why is this needed?
+ DocTools # yields kdoctools_create_handbook
+ Sane # will find KF5Sane
+)
# Subdirectories
add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b6066b6..b78bba4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,6 +2,7 @@ set(skanlite_SRCS main.cpp skanlite.cpp ImageViewer.cpp KSaneImageSaver.cpp Save
qt5_wrap_ui(skanlite_SRCS settings.ui SaveLocation.ui)
+# FIXME KF5
#kde4_add_app_icon(skanlite_SRCS "${KDE4_INSTALL_DIR}/share/icons/oxygen/*/devices/scanner.png")
add_executable(skanlite ${skanlite_SRCS})
@@ -11,14 +12,13 @@ target_link_libraries(skanlite
Qt5::Core
PRIVATE
KF5::CoreAddons
- # Other private libs
KF5::Sane
KF5::I18n
KF5::PrintUtils
KF5::Wallet
- #KF5::WidgetsAddons
+ KF5::XmlGui
+ KF5::KIOWidgets
${PNG_LIBRARY}
- KF5::KDE4Support # FIXME KF5: remove that later
)
install(TARGETS skanlite ${INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/src/ImageViewer.cpp b/src/ImageViewer.cpp
index 868db70..335b1ed 100644
--- a/src/ImageViewer.cpp
+++ b/src/ImageViewer.cpp
@@ -29,10 +29,10 @@
#include <QGraphicsScene>
#include <QScrollBar>
#include <QAction>
-#include <KIcon>
-#include <KLocale>
+#include <QDebug>
+#include <QIcon>
-#include <KDebug>
+#include <KLocalizedString>
struct ImageViewer::Private
{
@@ -56,16 +56,16 @@ ImageViewer::ImageViewer(QWidget *parent) : QGraphicsView(parent), d(new Private
setScene(d->scene);
// create context menu
- d->zoomInAction = new QAction(KIcon("zoom-in"), i18n("Zoom In"), this);
+ d->zoomInAction = new QAction(QIcon::fromTheme("zoom-in"), i18n("Zoom In"), this);
connect(d->zoomInAction, SIGNAL(triggered()), this, SLOT(zoomIn()));
- d->zoomOutAction = new QAction(KIcon("zoom-out"), i18n("Zoom Out"), this);
+ d->zoomOutAction = new QAction(QIcon::fromTheme("zoom-out"), i18n("Zoom Out"), this);
connect(d->zoomOutAction, SIGNAL(triggered()), this, SLOT(zoomOut()));
- d->zoom100Action = new QAction(KIcon("zoom-fit-best"), i18n("Zoom to Actual size"), this);
+ d->zoom100Action = new QAction(QIcon::fromTheme("zoom-fit-best"), i18n("Zoom to Actual size"), this);
connect(d->zoom100Action, SIGNAL(triggered()), this, SLOT(zoomActualSize()));
- d->zoom2FitAction = new QAction(KIcon("document-preview"), i18n("Zoom to Fit"), this);
+ d->zoom2FitAction = new QAction(QIcon::fromTheme("document-preview"), i18n("Zoom to Fit"), this);
connect(d->zoom2FitAction, SIGNAL(triggered()), this, SLOT(zoom2Fit()));
addAction(d->zoomInAction);
diff --git a/src/KSaneImageSaver.cpp b/src/KSaneImageSaver.cpp
index c872932..3154305 100644
--- a/src/KSaneImageSaver.cpp
+++ b/src/KSaneImageSaver.cpp
@@ -26,9 +26,8 @@
#include <png.h>
-#include <KDebug>
#include <QMutex>
-
+#include <QDebug>
struct KSaneImageSaver::Private
{
@@ -82,7 +81,7 @@ bool KSaneImageSaver::savePng(const QString &name, const QByteArray &data, int w
bool KSaneImageSaver::savePngSync(const QString &name, const QByteArray &data, int width, int height, int format)
{
if (!savePng(name, data, width, height, format)) {
- kDebug() << "fail";
+ qDebug() << "fail";
return false;
}
wait();
@@ -100,7 +99,7 @@ bool KSaneImageSaver::saveTiff(const QString &name, const QByteArray &data, int
d->m_format = format;
d->m_type = Private::ImageTypeTIFF;
- kDebug() << "saving Tiff images is not yet supported";
+ qDebug() << "saving Tiff images is not yet supported";
d->m_runMutex.unlock();
return false;
}
diff --git a/src/SaveLocation.cpp b/src/SaveLocation.cpp
index 7c8e5c0..8deffd6 100644
--- a/src/SaveLocation.cpp
+++ b/src/SaveLocation.cpp
@@ -34,11 +34,11 @@ SaveLocation::SaveLocation(QWidget *parent) : QDialog(parent)
{
setupUi(this);
- connect(u_saveDirLEdit, SIGNAL(textChanged(QString)), this, SLOT(updateGui()));
+ connect(u_urlRequester, SIGNAL(textChanged(QString)), this, SLOT(updateGui()));
+ connect(u_urlRequester, &KUrlRequester::urlSelected, this, &SaveLocation::getDir);
connect(u_imgPrefix, SIGNAL(textChanged(QString)), this, SLOT(updateGui()));
connect(u_imgFormat, SIGNAL(activated(QString)), this, SLOT(updateGui()));
connect(u_numStartFrom, SIGNAL(valueChanged(int)), this, SLOT(updateGui()));
- connect(u_getDirButton, &QPushButton::clicked, this, &SaveLocation::getDir);
}
SaveLocation::~SaveLocation()
@@ -51,13 +51,13 @@ void SaveLocation::updateGui()
u_numStartFrom->setValue(1); // Reset the counter whenever the directory or the prefix is changed
}
QString name = QString("%1%2.%3").arg(u_imgPrefix->text()).arg(u_numStartFrom->value(), 4, 10, QLatin1Char('0')).arg(u_imgFormat->currentText());
- u_resultValue->setText(QFileInfo(u_saveDirLEdit->text(), name).absoluteFilePath());
+ u_resultValue->setText(QUrl(u_urlRequester->url().resolved(QUrl("name"))).toLocalFile());
}
void SaveLocation::getDir(void)
{
- QString newDir = QFileDialog::getExistingDirectory(this, QString(), u_saveDirLEdit->text());
+ QString newDir = QFileDialog::getExistingDirectory(this, QString(), u_urlRequester->url().toLocalFile());
if (!newDir.isEmpty()) {
- u_saveDirLEdit->setText(newDir);
+ u_urlRequester->setUrl(newDir);
}
}
diff --git a/src/SaveLocation.ui b/src/SaveLocation.ui
index c6ece35..fa588f3 100644
--- a/src/SaveLocation.ui
+++ b/src/SaveLocation.ui
@@ -36,14 +36,7 @@
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QLineEdit" name="u_saveDirLEdit"/>
- </item>
- <item>
- <widget class="QToolButton" name="u_getDirButton">
- <property name="text">
- <string>...</string>
- </property>
- </widget>
+ <widget class="KUrlRequester" name="u_urlRequester"/>
</item>
</layout>
</item>
@@ -176,6 +169,13 @@
</item>
</layout>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>KUrlRequester</class>
+ <extends>QWidget</extends>
+ <header>kurlrequester.h</header>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections>
<connection>
diff --git a/src/TODO b/src/TODO
index 03d493a..e10e96f 100644
--- a/src/TODO
+++ b/src/TODO
@@ -6,7 +6,11 @@ Changes in 1.2.0 (from 1.1.0)
Major issues
------------
+* fix all KIO::NetAccess
+* Settings dialog: ...-Button to select target directory shows wrong dialog due to bug in frameworksintegration
+ * see comments in 'void Skanlite::getDir(void)'
* Save Image Dialog: KDE Save Dialog is borken (see https://git.reviewboard.kde.org/r/115238/)
+ * probably due to a bug in QFileDialog integration the desired file type filter will not be selected (it defaults to png)
Questions
---------
@@ -18,6 +22,7 @@ Minor issues
* Main dialog: Help and Close button do not have icons but they had before (is this a KF5 theme issue?)
* Settings dialog: Ok, Cancel button has no icons (is this a KF5 theme issue?)
* Show image dialog: Save button has no image (is this a KF5 theme issue?)
+* see FIXME KF5
before 2014
===========
diff --git a/src/main.cpp b/src/main.cpp
index 3ac20f2..ad3e683 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -23,11 +23,10 @@
#include <QCommandLineParser>
#include <QCommandLineOption>
+#include <QDebug>
-#include <kapplication.h>
#include <kcmdlineargs.h>
#include <KAboutData>
-#include <kglobal.h>
#include "skanlite.h"
#include "version.h"
@@ -52,6 +51,9 @@ int main(int argc, char *argv[])
aboutData.addAuthor(i18n("Arseniy Lartsev"),
i18n("contributor"));
+
+ aboutData.addAuthor(i18n("Gregor Mi"),
+ i18n("contributor"));
aboutData.addCredit(i18n("Gilles Caulier"),
i18n("Importing libksane to extragear"));
diff --git a/src/settings.ui b/src/settings.ui
index ac7842b..5893902 100644
--- a/src/settings.ui
+++ b/src/settings.ui
@@ -133,7 +133,7 @@
</widget>
</item>
<item>
- <widget class="KComboBox" name="imgFormat"/>
+ <widget class="QComboBox" name="imgFormat"/>
</item>
</layout>
</item>
@@ -238,7 +238,7 @@
</widget>
</item>
<item row="0" column="2">
- <widget class="KComboBox" name="previewDPI">
+ <widget class="QComboBox" name="previewDPI">
<property name="enabled">
<bool>false</bool>
</property>
@@ -335,13 +335,6 @@
</item>
</layout>
</widget>
- <customwidgets>
- <customwidget>
- <class>KComboBox</class>
- <extends>QComboBox</extends>
- <header>kcombobox.h</header>
- </customwidget>
- </customwidgets>
<resources/>
<connections>
<connection>
diff --git a/src/skanlite.cpp b/src/skanlite.cpp
index ad19ee0..1d1e654 100644
--- a/src/skanlite.cpp
+++ b/src/skanlite.cpp
@@ -27,7 +27,6 @@
#include "KSaneImageSaver.h"
#include "SaveLocation.h"
-
#include <QApplication>
#include <QScrollArea>
#include <QStringList>
@@ -36,12 +35,17 @@
#include <QDialogButtonBox>
#include <QComboBox>
#include <QMessageBox>
+#include <QTemporaryFile>
+#include <QDebug>
+#include <QImageWriter>
+#include <QMimeType>
+#include <QMimeDatabase>
#include <KAboutApplicationDialog>
+#include <KLocalizedString>
#include <KMessageBox>
-#include <KImageIO>
-#include <kio/netaccess.h>
-#include <KTemporaryFile>
+// #include <kio/netaccess.h> // FIXME KF5: see /usr/include/kio/netaccess.h
+#include <KIO/StatJob>
#include <kio/global.h>
#include <KSharedConfig>
#include <KConfigGroup>
@@ -106,7 +110,15 @@ Skanlite::Skanlite(const QString& device, QWidget* parent)
m_saveLocation = new SaveLocation(this);
// add the supported image types
- m_filterList = KImageIO::mimeTypes(KImageIO::Writing);
+ const QList<QByteArray> tmpList = QImageWriter::supportedMimeTypes();
+ m_filterList.clear();
+ foreach (auto ba, tmpList)
+ {
+ m_filterList.append(QString::fromLatin1(ba));
+ }
+
+ qDebug() << m_filterList;
+
// Put first class citizens at first place
m_filterList.removeAll("image/jpeg");
m_filterList.removeAll("image/tiff");
@@ -118,14 +130,18 @@ Skanlite::Skanlite(const QString& device, QWidget* parent)
m_filter16BitList << "image/png";
//m_filter16BitList << "image/tiff";
- QString mime;
- QStringList type;
- foreach (mime , m_filterList) {
- type = KImageIO::typeForMime(mime);
- if (type.size() > 0) {
- m_typeList << type.first();
+ // fill m_filterList (...) and m_typeList (list of file suffixes)
+ foreach (QString mimeStr, m_filterList) {
+ QMimeType mimeType = QMimeDatabase().mimeTypeForName(mimeStr);
+ m_filterList.append(mimeType.name());
+
+ QStringList fileSuffixes = mimeType.suffixes();
+
+ if (fileSuffixes.size() > 0) {
+ m_typeList << fileSuffixes.first();
}
}
+
m_settingsUi.imgFormat->addItems(m_typeList);
m_saveLocation->u_imgFormat->addItems(m_typeList);
@@ -145,7 +161,7 @@ Skanlite::Skanlite(const QString& device, QWidget* parent)
readSettings();
// default directory for the save dialog
- m_saveLocation->u_saveDirLEdit->setText(m_settingsUi.saveDirLEdit->text());
+ m_saveLocation->u_urlRequester->setUrl(m_settingsUi.saveDirLEdit->text());
m_saveLocation->u_imgPrefix->setText(m_settingsUi.imgPrefix->text());
m_saveLocation->u_imgFormat->setCurrentText(m_settingsUi.imgFormat->currentText());
}
@@ -217,7 +233,6 @@ void Skanlite::setAboutData(KAboutData* aboutData)
m_aboutData = aboutData;
}
-//************************************************************
void Skanlite::closeEvent(QCloseEvent *event)
{
saveWindowSize();
@@ -225,13 +240,13 @@ void Skanlite::closeEvent(QCloseEvent *event)
event->accept();
}
-//************************************************************
void Skanlite::saveWindowSize()
{
KConfigGroup window(KSharedConfig::openConfig(), "Window");
window.writeEntry("Geometry", size());
window.sync();
}
+
// Pops up message box similar to what perror() would print
//************************************************************
static void perrorMessageBox(const QString &text)
@@ -244,7 +259,6 @@ static void perrorMessageBox(const QString &text)
}
}
-//************************************************************
void Skanlite::readSettings(void)
{
// enable the widgets to allow modifying
@@ -257,13 +271,16 @@ void Skanlite::readSettings(void)
if (m_settingsUi.saveModeCB->currentIndex() != SaveModeAskFirst) m_firstImage = false;
m_settingsUi.saveDirLEdit->setText(saving.readEntry("Location", QDir::homePath()));
m_settingsUi.imgPrefix->setText(saving.readEntry("NamePrefix", i18nc("prefix for auto naming", "Image-")));
- m_settingsUi.imgFormat->setCurrentItem(saving.readEntry("ImgFormat", "png"));
+ m_settingsUi.imgFormat->setCurrentText(saving.readEntry("ImgFormat", "png"));
m_settingsUi.imgQuality->setValue(saving.readEntry("ImgQuality", 90));
m_settingsUi.setQuality->setChecked(saving.readEntry("SetQuality", false));
m_settingsUi.showB4Save->setChecked(saving.readEntry("ShowBeforeSave", true));
KConfigGroup general(KSharedConfig::openConfig(), "General");
- m_settingsUi.previewDPI->setCurrentItem(general.readEntry("PreviewDPI", "100"), true);
+
+ //m_settingsUi.previewDPI->setCurrentItem(general.readEntry("PreviewDPI", "100"), true); // FIXME KF5 is the 'true' parameter still needed?
+ m_settingsUi.previewDPI->setCurrentText(general.readEntry("PreviewDPI", "100"));
+
m_settingsUi.setPreviewDPI->setChecked(general.readEntry("SetPreviewDPI", false));
if (m_settingsUi.setPreviewDPI->isChecked()) {
m_ksanew->setPreviewResolution(m_settingsUi.previewDPI->currentText().toFloat());
@@ -275,7 +292,6 @@ void Skanlite::readSettings(void)
m_ksanew->enableAutoSelect(!m_settingsUi.u_disableSelections->isChecked());
}
-//************************************************************
void Skanlite::showSettingsDialog(void)
{
readSettings();
@@ -310,7 +326,7 @@ void Skanlite::showSettingsDialog(void)
m_ksanew->enableAutoSelect(!m_settingsUi.u_disableSelections->isChecked());
// pressing OK in the settings dialog means use those settings.
- m_saveLocation->u_saveDirLEdit->setText(m_settingsUi.saveDirLEdit->text());
+ m_saveLocation->u_urlRequester->setUrl(m_settingsUi.saveDirLEdit->text());
m_saveLocation->u_imgPrefix->setText(m_settingsUi.imgPrefix->text());
m_saveLocation->u_imgFormat->setCurrentText(m_settingsUi.imgFormat->currentText());
@@ -322,8 +338,6 @@ void Skanlite::showSettingsDialog(void)
}
}
-
-//************************************************************
void Skanlite::imageReady(QByteArray &data, int w, int h, int bpl, int f)
{
// save the image data
@@ -348,7 +362,6 @@ void Skanlite::imageReady(QByteArray &data, int w, int h, int bpl, int f)
}
}
-//************************************************************
void Skanlite::saveImage()
{
qDebug() << "saveImage()";
@@ -359,7 +372,7 @@ void Skanlite::saveImage()
m_firstImage = false;
}
- QString dir = m_saveLocation->u_saveDirLEdit->text();
+ QString dir = m_saveLocation->u_urlRequester->url().toLocalFile();
QString prefix = m_saveLocation->u_imgPrefix->text();
QString imgFormat = m_saveLocation->u_imgFormat->currentText().toLower();
int fileNumber = m_saveLocation->u_numStartFrom->value();
@@ -374,7 +387,6 @@ void Skanlite::saveImage()
}
}
-
// find next available file name for name suggestion
QUrl fileUrl;
QString fname;
@@ -391,9 +403,15 @@ void Skanlite::saveImage()
}
}
else {
- if (!KIO::NetAccess::exists(fileUrl, true, this)) {
+ //if (!KIO::NetAccess::exists(fileUrl, true, this)) { // FIXME KF5 ok?
+ KIO::StatJob* statJob = KIO::stat(fileUrl);
+ if (!statJob->exec()) {
break;
}
+ else {
+ //statJob-> // FIXME KF5 TODO: determine if stat was ok, if not then break
+ //break;
+ }
}
}
@@ -405,13 +423,17 @@ void Skanlite::saveImage()
// ask for a filename if requested.
qDebug() << fileUrl.url();
+ // qDebug() << fileUrl.toLocalFile(); // returns ""
saveDialog.selectFile(fileUrl.url());
- //saveDialog.setMimeTypeFilters(filterList, "image/"+type); // FIXME KF5: review if works when QFileDialog is fixed by KDE frameworks team
QStringList actualFilterList = filterList;
- actualFilterList << ("image/" + imgFormat);
+ QString currentMimeFilter = "image/" + imgFormat;
saveDialog.setMimeTypeFilters(actualFilterList);
+ // FIXME KF5 / WAIT: probably due to a bug in QFileDialog integration the desired file type filter will not be selected (it defaults to the first one: png)
+ // saveDialog.selectMimeTypeFilter(currentMimeFilter); // does not work
+ // saveDialog.selectNameFilter("*." + imgFormat); // does not work either
+
do {
if (saveDialog.exec() != QFileDialog::Accepted) return;
@@ -419,7 +441,9 @@ void Skanlite::saveImage()
fileUrl = saveDialog.selectedUrls().first();
//kDebug() << "-----Save-----" << fname;
- if (KIO::NetAccess::exists(fileUrl, true, this)) {
+ //if (KIO::NetAccess::exists(fileUrl, true, this)) { // FIXME KF5
+ if (false) {
+
if (KMessageBox::warningContinueCancel(this,
i18n("Do you want to overwrite \"%1\"?", fileUrl.fileName()),
QString(),
@@ -449,9 +473,9 @@ void Skanlite::saveImage()
//kDebug() << "suffix" << fileInfo.suffix() << "localFile" << fileUrl.pathOrUrl();
fname = fileUrl.path();
- KTemporaryFile tmp;
+ QTemporaryFile tmp;
if (!fileUrl.isLocalFile()) {
- tmp.setSuffix('.'+fileInfo.suffix());
+ // tmp.setSuffix('.'+fileInfo.suffix()); // FIXME KF5 needed?
tmp.open();
fname = tmp.fileName();
tmp.close(); // we just want the filename
@@ -483,9 +507,12 @@ void Skanlite::saveImage()
}
if (!fileUrl.isLocalFile()) {
- if (!KIO::NetAccess::upload( fname, fileUrl, this )) {
- KMessageBox::sorry(0, i18n("Failed to upload image"));
- }
+
+ // FIXME KF5:
+// if (!KIO::NetAccess::upload( fname, fileUrl, this )) {
+// KMessageBox::sorry(0, i18n("Failed to upload image"));
+// }
+
}
// Save the file base name without number
@@ -505,28 +532,26 @@ void Skanlite::saveImage()
if (m_settingsUi.saveModeCB->currentIndex() == SaveModeManual) {
// Save last used dir, prefix and suffix.
- m_saveLocation->u_saveDirLEdit->setText(KIO::upUrl(fileUrl).path());
+ m_saveLocation->u_urlRequester->setUrl(KIO::upUrl(fileUrl).path());
m_saveLocation->u_imgFormat->setCurrentText(fileInfo.suffix());
}
}
-
-//************************************************************
void Skanlite::getDir(void)
{
- QString dir = QFileDialog::getExistingDirectory(this, QString(), m_settingsUi.saveDirLEdit->text());
+ // FIXME KF5 / WAIT: this is not working yet due to a bug in frameworkintegration:
+ // see commit: 2c1ee08a21a1f16f9c2523718224598de8fc0d4f for kf5/src/frameworks/frameworkintegration/tests/qfiledialogtest.cpp
+ QString dir = QFileDialog::getExistingDirectory(m_settingsDialog, QString(), m_settingsUi.saveDirLEdit->text());
if (!dir.isEmpty()) {
m_settingsUi.saveDirLEdit->setText(dir);
}
}
-//************************************************************
void Skanlite::showAboutDialog(void)
{
KAboutApplicationDialog(*m_aboutData).exec();
}
-//************************************************************
void Skanlite::saveScannerOptions()
{
KConfigGroup saving(KSharedConfig::openConfig(), "Image Saving");
@@ -545,7 +570,6 @@ void Skanlite::saveScannerOptions()
options.sync();
}
-//************************************************************
void Skanlite::defaultScannerOptions()
{
if (!m_ksanew) return;
@@ -553,7 +577,6 @@ void Skanlite::defaultScannerOptions()
m_ksanew->setOptVals(m_defaultScanOpts);
}
-//************************************************************
void Skanlite::loadScannerOptions()
{
KConfigGroup saving(KSharedConfig::openConfig(), "Image Saving");
@@ -565,7 +588,6 @@ void Skanlite::loadScannerOptions()
m_ksanew->setOptVals(scannerOptions.entryMap());
}
-//************************************************************
void Skanlite::availableDevices(const QList<KSaneWidget::DeviceInfo> &deviceList)
{
for (int i=0; i<deviceList.size(); i++) {
@@ -573,7 +595,6 @@ void Skanlite::availableDevices(const QList<KSaneWidget::DeviceInfo> &deviceList
}
}
-//************************************************************
void Skanlite::alertUser(int type, const QString &strStatus)
{
switch (type) {
@@ -585,7 +606,6 @@ void Skanlite::alertUser(int type, const QString &strStatus)
}
}
-//************************************************************
void Skanlite::buttonPressed(const QString &optionName, const QString &optionLabel, bool pressed)
{
qDebug() << "Button" << optionName << optionLabel << ((pressed) ? "pressed" : "released");