LeechCraft
0.6.70-19424-g027e980fd1
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
categoryselector.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include <QAbstractItemModel>
12
#include <QStringList>
13
#include <QWidget>
14
#include "
tagsconfig.h
"
15
16
class
QTreeView;
17
18
namespace
LC::Util
19
{
27
class
UTIL_TAGS_API
CategorySelector
:
public
QWidget
28
{
29
Q_OBJECT
30
31
class
CheckableModel
;
32
CheckableModel
& Model_;
33
QTreeView& View_;
34
public
:
35
explicit
CategorySelector
(QWidget *parent =
nullptr
);
36
39
void
SetModel
(QAbstractItemModel& model);
40
43
void
SetCaption
(
const
QString& caption);
44
49
QStringList
GetSelections
()
const
;
50
55
QModelIndexList
GetSelectedIndexes
()
const
;
56
61
void
SetSelections
(
const
QStringList& names);
62
67
void
SelectAll
();
68
73
void
SelectNone
();
74
signals:
79
void
selectionEdited
(
const
QStringList& selected);
80
};
81
}
LC::Util::CategorySelector::CheckableModel
Definition
categoryselector.cpp:19
LC::Util::CategorySelector::selectionEdited
void selectionEdited(const QStringList &selected)
Emitted after the user has changed the selection, with GetSelections().
LC::Util::CategorySelector::GetSelections
QStringList GetSelections() const
Returns the selected names present in the model.
Definition
categoryselector.cpp:186
LC::Util::CategorySelector::SetModel
void SetModel(QAbstractItemModel &model)
Lists the names of model, which is not owned.
Definition
categoryselector.cpp:175
LC::Util::CategorySelector::CategorySelector
CategorySelector(QWidget *parent=nullptr)
Definition
categoryselector.cpp:135
LC::Util::CategorySelector::SelectNone
void SelectNone()
Clears the selection.
Definition
categoryselector.cpp:206
LC::Util::CategorySelector::SetCaption
void SetCaption(const QString &caption)
Sets the header above the list; there is none by default.
Definition
categoryselector.cpp:180
LC::Util::CategorySelector::SetSelections
void SetSelections(const QStringList &names)
Replaces the selection.
Definition
categoryselector.cpp:196
LC::Util::CategorySelector::SelectAll
void SelectAll()
Selects exactly the names in the model.
Definition
categoryselector.cpp:201
LC::Util::CategorySelector::GetSelectedIndexes
QModelIndexList GetSelectedIndexes() const
Returns the model's indexes of the selected names.
Definition
categoryselector.cpp:191
LC::Util
Definition
icoreproxy.h:34
tagsconfig.h
UTIL_TAGS_API
#define UTIL_TAGS_API
Definition
tagsconfig.h:16
src
util
tags
categoryselector.h
Generated by
1.18.0