[kde-doc-english] [libksane] libksane: Add the clear selection preview window action also as a tool button

Kåre Särs kare.sars at iki.fi
Thu Aug 15 19:24:59 UTC 2013


Git commit 6caec171a002f93b77c9fcddcdf2da3f2f898ec8 by Kåre Särs.
Committed on 15/08/2013 at 19:18.
Pushed by sars into branch 'master'.

Add the clear selection preview window action also as a tool button

BUG: 323438
FIXED-IN: KDE 4.12
GUI:

M  +8    -1    libksane/ksane_widget.cpp
M  +1    -0    libksane/ksane_widget_private.cpp
M  +1    -0    libksane/ksane_widget_private.h

http://commits.kde.org/libksane/6caec171a002f93b77c9fcddcdf2da3f2f898ec8

diff --git a/libksane/ksane_widget.cpp b/libksane/ksane_widget.cpp
index bccbe91..61b05b7 100644
--- a/libksane/ksane_widget.cpp
+++ b/libksane/ksane_widget.cpp
@@ -159,7 +159,13 @@ KSaneWidget::KSaneWidget(QWidget* parent)
     d->m_zFitBtn->setIcon(KIcon("document-preview"));
     d->m_zFitBtn->setToolTip(i18n("Zoom to Fit"));
     connect(d->m_zFitBtn, SIGNAL(clicked()), d->m_previewViewer, SLOT(zoom2Fit()));
-    
+
+    d->m_clearSelBtn = new QToolButton(this);
+    d->m_clearSelBtn->setAutoRaise(true);
+    d->m_clearSelBtn->setIcon(KIcon("edit-clear"));
+    d->m_clearSelBtn->setToolTip(i18n("Clear Selections"));
+    connect(d->m_clearSelBtn, SIGNAL(clicked()), d->m_previewViewer, SLOT(clearSelections()));
+
     d->m_prevBtn = new KPushButton(this);
     d->m_prevBtn->setIcon(KIcon("document-import"));
     d->m_prevBtn->setToolTip(i18n("Scan Preview Image"));
@@ -180,6 +186,7 @@ KSaneWidget::KSaneWidget(QWidget* parent)
     btn_lay->addWidget(d->m_zOutBtn);
     btn_lay->addWidget(d->m_zSelBtn);
     btn_lay->addWidget(d->m_zFitBtn);
+    btn_lay->addWidget(d->m_clearSelBtn);
     btn_lay->addStretch(100);
     btn_lay->addWidget(d->m_prevBtn);
     btn_lay->addWidget(d->m_scanBtn);
diff --git a/libksane/ksane_widget_private.cpp b/libksane/ksane_widget_private.cpp
index 31e096e..0fb9280 100644
--- a/libksane/ksane_widget_private.cpp
+++ b/libksane/ksane_widget_private.cpp
@@ -58,6 +58,7 @@ q(parent)
     m_zOutBtn       = 0;
     m_zSelBtn       = 0;
     m_zFitBtn       = 0;
+    m_clearSelBtn   = 0;
     m_prevBtn       = 0;
     m_scanBtn       = 0;
     m_cancelBtn     = 0;
diff --git a/libksane/ksane_widget_private.h b/libksane/ksane_widget_private.h
index e376570..8adf06f 100644
--- a/libksane/ksane_widget_private.h
+++ b/libksane/ksane_widget_private.h
@@ -129,6 +129,7 @@ namespace KSaneIface
             QToolButton        *m_zOutBtn;
             QToolButton        *m_zSelBtn;
             QToolButton        *m_zFitBtn;
+            QToolButton        *m_clearSelBtn;
             KPushButton        *m_scanBtn;
             KPushButton        *m_prevBtn;
 


More information about the kde-doc-english mailing list