forked from wtr9987/gvtree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtagprefgridlayout.cpp
47 lines (39 loc) · 1.51 KB
/
tagprefgridlayout.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* --------------------------------------------- */
/* */
/* Copyright (C) 2021 Wolfgang Trummer */
/* Contact: [email protected] */
/* */
/* gvtree V1.8-0 */
/* */
/* git version tree browser */
/* */
/* 28. December 2021 */
/* */
/* This program is licensed under */
/* GNU GENERAL PUBLIC LICENSE */
/* Version 3, 29 June 2007 */
/* */
/* --------------------------------------------- */
#include "tagprefgridlayout.h"
TagPrefGridLayout::TagPrefGridLayout(QWidget* _parent) : QGridLayout(_parent), line(0)
{
}
const TagPreference* TagPrefGridLayout::getTagPreference(const QString& _item) const
{
if (tp.contains(_item))
return tp[_item];
return NULL;
}
void TagPrefGridLayout::addTagPreference(const QString& _name, const QString& _regexp, bool _regexpChangable)
{
TagPreference* tpw = new TagPreference(line, _name, _regexp, this);
if (!_regexpChangable)
tpw->disableRegExp();
connect(tpw, SIGNAL(regexpChanged()), this, SLOT(regexpChangedProxy()));
tp[_name] = tpw;
line++;
}
void TagPrefGridLayout::regexpChangedProxy()
{
emit regexpChanged();
}