• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

libs/libksane/libksane

  • sources
  • kde-4.14
  • kdegraphics
  • libs
  • libksane
  • libksane
  • widgets
labeled_combo.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is part of the KDE project
4  *
5  * Description : Sane interface for KDE
6  *
7  * Copyright (C) 2007-2011 by Kare Sars <kare.sars@iki .fi>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) version 3, or any
13  * later version accepted by the membership of KDE e.V. (or its
14  * successor approved by the membership of KDE e.V.), which shall
15  * act as a proxy defined in Section 6 of version 3 of the license.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this program. If not, see <http://www.gnu.org/licenses/>.
24  *
25  * ============================================================ */
26 
27 #ifndef LABELED_COMBO_H
28 #define LABELED_COMBO_H
29 
30 #include "ksane_option_widget.h"
31 
32 // KDE includes
33 #include <KComboBox>
34 
35 namespace KSaneIface
36 {
37 
41 class LabeledCombo : public KSaneOptionWidget
42 {
43  Q_OBJECT
44 
45 public:
52  LabeledCombo(QWidget *parent, const QString& label, const QStringList& list);
53 
54 
55 public Q_SLOTS:
56 
60  void addItems(const QStringList &list);
61 
65  void clear() { m_combo->clear(); }
66 
71  void setCurrentText(const QString &);
72 
76  QString currentText();
77 
81  void setCurrentIndex(int);
82 
88  bool setIcon(const QIcon& icon, const QString& str);
89 
90 Q_SIGNALS:
91 
92  void activated(int);
93 
94 private:
95  KComboBox *m_combo;
96 };
97 
98 } // NameSpace KSaneIface
99 
100 #endif // LABELED_COMBO_H
QWidget
KSaneIface::LabeledCombo::setCurrentText
void setCurrentText(const QString &)
If the given string can be found in the comobox, activate that entry.
Definition: labeled_combo.cpp:69
KSaneIface::LabeledCombo::addItems
void addItems(const QStringList &list)
Add string entries to the combobox.
Definition: labeled_combo.cpp:57
QWidget::icon
const QPixmap * icon() const
KSaneIface::KSaneOptionWidget
A wrapper for a checkbox.
Definition: ksane_option_widget.h:45
ksane_option_widget.h
QString
QStringList
KSaneIface::LabeledCombo::currentText
QString currentText()
This function is used to read the current string of the combobox.
Definition: labeled_combo.cpp:79
KSaneIface::LabeledCombo::activated
void activated(int)
KSaneIface::LabeledCombo::setIcon
bool setIcon(const QIcon &icon, const QString &str)
add an icon for a string in the combobox
Definition: labeled_combo.cpp:85
KSaneIface::LabeledCombo::setCurrentIndex
void setCurrentIndex(int)
set the current item of the combobox.
Definition: labeled_combo.cpp:96
KSaneIface::LabeledCombo::LabeledCombo
LabeledCombo(QWidget *parent, const QString &label, const QStringList &list)
create a label and combobox combination.
Definition: labeled_combo.cpp:40
KSaneIface::LabeledCombo
A label and a combobox.
Definition: labeled_combo.h:41
QObject::parent
QObject * parent() const
KSaneIface::LabeledCombo::clear
void clear()
Remove all string entries.
Definition: labeled_combo.h:65
QIcon
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:47 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libs/libksane/libksane

Skip menu "libs/libksane/libksane"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal