digiKam
Loading...
Searching...
No Matches
dcombobox.h
Go to the documentation of this file.
1
/* ============================================================
2
*
3
* This file is a part of digiKam project
4
* https://www.digikam.org
5
*
6
* Date : 2008-08-16
7
* Description : a combo box widget re-implemented with a
8
* reset button to switch to a default item
9
*
10
* SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
11
*
12
* SPDX-License-Identifier: GPL-2.0-or-later
13
*
14
* ============================================================ */
15
16
#pragma once
17
18
// Qt includes
19
20
#include <QWidget>
21
#include <QComboBox>
22
#include <QVariant>
23
24
// Local includes
25
26
#include "
digikam_export.h
"
27
28
namespace
Digikam
29
{
30
31
class
DIGIKAM_EXPORT
DComboBox
:
public
QWidget
32
{
33
34
Q_OBJECT
35
36
public
:
37
38
explicit
DComboBox
(QWidget*
const
parent =
nullptr
);
39
~DComboBox
()
override
;
40
41
void
setCurrentIndex(
int
d);
42
int
currentIndex()
const
;
43
44
void
setDefaultIndex(
int
d);
45
int
defaultIndex()
const
;
46
47
QComboBox* combo()
const
;
48
49
void
addItem(
const
QString& t,
50
const
QVariant& data = QVariant());
51
void
insertItem(
int
index,
const
QString& t,
52
const
QVariant& data = QVariant());
53
54
Q_SIGNALS:
55
56
void
reset
();
57
void
activated
(
int
);
58
void
currentIndexChanged
(
int
);
59
60
public
Q_SLOTS:
61
62
void
slotReset();
63
64
private
Q_SLOTS:
65
66
void
slotItemActivated(
int
);
67
void
slotCurrentIndexChanged(
int
);
68
69
private
:
70
71
class
Private;
72
Private*
const
d =
nullptr
;
73
};
74
75
}
// namespace Digikam
Digikam::DComboBox
Definition
dcombobox.h:32
Digikam::DComboBox::reset
void reset()
Digikam::DComboBox::activated
void activated(int)
Digikam::DComboBox::currentIndexChanged
void currentIndexChanged(int)
digikam_export.h
Digikam
Definition
datefolderview.cpp:34
core
libs
widgets
combo
dcombobox.h
Generated by
1.9.8