QElectroTech  0.70
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
NameListWidget Class Reference

The NameListWidget class Provide a widget for let user define localized string;. More...

#include <namelistwidget.h>

Public Member Functions

 NameListWidget (QWidget *parent=nullptr)
 
 ~NameListWidget ()
 
void addLine ()
 NameListWidget::addLine Add a new line to the name list widget. More...
 
void setNames (const NamesList &name_list)
 NameListWidget::setNames Set the current names of this dialog from . More...
 
NamesList names () const
 NameListWidget::names. More...
 
void setReadOnly (bool ro)
 NameListWidget::setReadOnly Set this dialog to read only or not. More...
 
bool isEmpty () const
 NameListWidget::isEmpty. More...
 
void setClipboardValue (QHash< QString, QString > value)
 

Private Slots

void on_m_clipboard_cb_activated (int index)
 

Private Member Functions

void clean ()
 NameListWidget::clean Clean the lists of names by removing the emtpy lines. More...
 

Private Attributes

Ui::NameListWidget * ui
 
bool m_read_only = false
 

Detailed Description

The NameListWidget class Provide a widget for let user define localized string;.

Definition at line 32 of file namelistwidget.h.

Constructor & Destructor Documentation

◆ NameListWidget()

NameListWidget::NameListWidget ( QWidget *  parent = nullptr)
explicit

Definition at line 24 of file namelistwidget.cpp.

References addLine(), and ui.

◆ ~NameListWidget()

NameListWidget::~NameListWidget ( )

Definition at line 33 of file namelistwidget.cpp.

References ui.

Member Function Documentation

◆ addLine()

void NameListWidget::addLine ( )

NameListWidget::addLine Add a new line to the name list widget.

Definition at line 42 of file namelistwidget.cpp.

References clean(), m_read_only, and ui.

Referenced by NameListWidget().

◆ clean()

void NameListWidget::clean ( )
private

NameListWidget::clean Clean the lists of names by removing the emtpy lines.

Definition at line 148 of file namelistwidget.cpp.

References ui.

Referenced by addLine().

◆ isEmpty()

bool NameListWidget::isEmpty ( ) const

NameListWidget::isEmpty.

Returns
true if empty. An empty dialog, is a dialog without any edited lang.

Definition at line 123 of file namelistwidget.cpp.

References NamesList::isEmpty(), and names().

Referenced by ElementsCategoryEditor::acceptCreation(), ElementsCategoryEditor::acceptUpdate(), ElementScene::slot_editNames(), and NewElementWizard::validateCurrentPage().

◆ names()

NamesList NameListWidget::names ( ) const

◆ on_m_clipboard_cb_activated

void NameListWidget::on_m_clipboard_cb_activated ( int  index)
privateslot

Definition at line 161 of file namelistwidget.cpp.

References ui.

◆ setClipboardValue()

void NameListWidget::setClipboardValue ( QHash< QString, QString >  value)

Definition at line 127 of file namelistwidget.cpp.

References ui.

Referenced by TitleBlockTemplateCellWidget::editTranslatableValue().

◆ setNames()

void NameListWidget::setNames ( const NamesList name_list)

NameListWidget::setNames Set the current names of this dialog from .

Parameters
name_list

Definition at line 60 of file namelistwidget.cpp.

References NamesList::langs(), m_read_only, and ui.

Referenced by TitleBlockTemplateCellWidget::editTranslatableValue(), and ElementScene::slot_editNames().

◆ setReadOnly()

void NameListWidget::setReadOnly ( bool  ro)

NameListWidget::setReadOnly Set this dialog to read only or not.

Parameters
ro

Definition at line 102 of file namelistwidget.cpp.

References m_read_only, QET::Icons::ro, and ui.

Referenced by ElementScene::slot_editNames().

Member Data Documentation

◆ m_read_only

bool NameListWidget::m_read_only = false
private

Definition at line 55 of file namelistwidget.h.

Referenced by addLine(), setNames(), and setReadOnly().

◆ ui

Ui::NameListWidget* NameListWidget::ui
private

The documentation for this class was generated from the following files: