QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
namelistwidget.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef NAMELISTWIDGET_H
19#define NAMELISTWIDGET_H
20
21#include "../nameslist.h"
22
23#include <QHash>
24#include <QWidget>
25
26namespace Ui {
27 class NameListWidget;
28}
29
34class NameListWidget : public QWidget
35{
36 Q_OBJECT
37
38 public:
39 explicit NameListWidget(QWidget *parent = nullptr);
41
42 void addLine();
43 void setNames (const NamesList &name_list);
44 NamesList names() const;
45 void setReadOnly(bool ro);
46 bool isEmpty() const;
47 void setClipboardValue (QHash <QString, QString> value);
48
49 private slots:
50 void on_m_clipboard_cb_activated(int index);
51
52 private:
53 void clean();
54
55 private:
56 Ui::NameListWidget *ui;
57 bool m_read_only = false;
58};
59
60#endif // NAMELISTWIDGET_H
The NameListWidget class Provide a widget for let user define localized string;.
Definition namelistwidget.h:35
bool isEmpty() const
NameListWidget::isEmpty.
Definition namelistwidget.cpp:125
void setNames(const NamesList &name_list)
NameListWidget::setNames Set the current names of this dialog from name_list.
Definition namelistwidget.cpp:60
void setReadOnly(bool ro)
NameListWidget::setReadOnly Set this dialog to read only or not.
Definition namelistwidget.cpp:104
Ui::NameListWidget * ui
Definition namelistwidget.h:56
bool m_read_only
Definition namelistwidget.h:57
void addLine()
NameListWidget::addLine Add a new line to the name list widget.
Definition namelistwidget.cpp:42
NamesList names() const
NameListWidget::names.
Definition namelistwidget.cpp:82
~NameListWidget()
Definition namelistwidget.cpp:33
void on_m_clipboard_cb_activated(int index)
Definition namelistwidget.cpp:164
void clean()
NameListWidget::clean Clean the lists of names by removing the empty lines.
Definition namelistwidget.cpp:151
void setClipboardValue(QHash< QString, QString > value)
Definition namelistwidget.cpp:130
Definition nameslist.h:31
Definition autonumberingdockwidget.h:26