LeechCraft
0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
tagslineedit.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 <memory>
12
#include <QLineEdit>
13
#include "
tagsconfig.h
"
14
#include "
categoryselector.h
"
15
16
namespace
LC::Util
17
{
18
class
TagsCompleter
;
19
class
LineEditButtonManager
;
20
28
class
UTIL_TAGS_API
TagsLineEdit
:
public
QLineEdit
29
{
30
Q_OBJECT
31
32
friend
class
TagsCompleter
;
33
34
CategorySelector
*CategorySelector_ =
nullptr
;
35
TagsCompleter
*Completer_ =
nullptr
;
36
37
QString Separator_;
38
public
:
45
explicit
TagsLineEdit
(QWidget *parent);
46
62
void
AddSelector
(
LineEditButtonManager
*manager =
nullptr
);
63
64
void
AddSelector
(
CategorySelector
*);
65
71
QString
GetSeparator
()
const
;
72
79
void
SetSeparator
(
const
QString&);
80
public
slots:
89
void
setTags
(
const
QStringList& tags);
90
protected
:
91
void
keyPressEvent
(QKeyEvent*)
override
;
92
void
focusInEvent
(QFocusEvent*)
override
;
93
void
contextMenuEvent
(QContextMenuEvent*)
override
;
94
void
SetCompleter
(
TagsCompleter
*);
95
private
:
103
void
InsertTag (
const
QString&
string
);
104
105
QString textUnderCursor ()
const
;
106
signals:
107
void
tagsChosen
();
108
};
109
}
categoryselector.h
LC::Util::CategorySelector
The CategorySelector widget provides a way to select amongst a group of items.
Definition
categoryselector.h:47
LC::Util::LineEditButtonManager
Manages additional overlay buttons in a QLineEdit.
Definition
lineeditbuttonmanager.h:37
LC::Util::TagsCompleter
Completer suitable for tag completion.
Definition
tagscompleter.h:39
LC::Util::TagsLineEdit::SetCompleter
void SetCompleter(TagsCompleter *)
Definition
tagslineedit.cpp:182
LC::Util::TagsLineEdit::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *) override
Definition
tagslineedit.cpp:170
LC::Util::TagsLineEdit::SetSeparator
void SetSeparator(const QString &)
Sets the separator for the tags.
Definition
tagslineedit.cpp:92
LC::Util::TagsLineEdit::focusInEvent
void focusInEvent(QFocusEvent *) override
Definition
tagslineedit.cpp:163
LC::Util::TagsLineEdit::GetSeparator
QString GetSeparator() const
Returns the separator for the tags.
Definition
tagslineedit.cpp:87
LC::Util::TagsLineEdit::tagsChosen
void tagsChosen()
LC::Util::TagsLineEdit::AddSelector
void AddSelector(LineEditButtonManager *manager=nullptr)
Adds the selector widget to the line edit.
Definition
tagslineedit.cpp:32
LC::Util::TagsLineEdit::keyPressEvent
void keyPressEvent(QKeyEvent *) override
Definition
tagslineedit.cpp:126
LC::Util::TagsLineEdit::setTags
void setTags(const QStringList &tags)
Sets the currently selected tags.
Definition
tagslineedit.cpp:119
LC::Util::TagsLineEdit::TagsLineEdit
TagsLineEdit(QWidget *parent)
Constructs the line edit widget.
Definition
tagslineedit.cpp:26
LC::Util::TagsLineEdit::TagsCompleter
friend class TagsCompleter
Definition
tagslineedit.h:32
LC::Util
Definition
icoreproxy.h:34
tagsconfig.h
UTIL_TAGS_API
#define UTIL_TAGS_API
Definition
tagsconfig.h:16
src
util
tags
tagslineedit.h
Generated by
1.13.2