Public Slots | Public Member Functions | Private Attributes | List of all members
dbutils::gui::NameValueLabelPair Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-02/DatabaseUtils/cxx/include/GUI/NameValueLabelPair.h"

Inheritance diagram for dbutils::gui::NameValueLabelPair:

Public Slots

void setValue (const std::string &value)
 

Public Member Functions

 NameValueLabelPair (std::string name, QWidget *parent=0)
 
std::string getValue () const
 

Private Attributes

QLabel * _valueLabel
 

Detailed Description

Class for providing two labels that display a parameter name and the associated value.

Author
Kurt Biery
Version
Revision
1.1.28.1
Date
2019/09/27 00:07:04

Definition at line 18 of file NameValueLabelPair.h.

Constructor & Destructor Documentation

dbutils::gui::NameValueLabelPair::NameValueLabelPair ( std::string  name,
QWidget *  parent = 0 
)

Definition at line 8 of file NameValueLabelPair.cpp.

References _valueLabel, and make_root_from_grid_output::tr.

8  :
9  QWidget(parent)
10 {
11  QHBoxLayout* hboxLayout = new QHBoxLayout;
12  hboxLayout->setContentsMargins(0,0,0,0);
13 
14  name.append(": ");
15  QLabel* nameLabel = new QLabel(tr(name.c_str()));
16  //nameLabel->setFrameStyle(QFrame::Box);
17  hboxLayout->addWidget(nameLabel);
18 
19  _valueLabel = new QLabel(tr("unknown"));
20  //_valueLabel->setFrameStyle(QFrame::Box);
21  _valueLabel->setStyleSheet("background: white");
22  _valueLabel->setContentsMargins(5, 0, 5, 0);
23  hboxLayout->addWidget(_valueLabel);
24 
25  hboxLayout->addStretch();
26 
27  this->setLayout(hboxLayout);
28 }
const XML_Char * name
Definition: expat.h:151

Member Function Documentation

std::string dbutils::gui::NameValueLabelPair::getValue ( ) const
inline

Definition at line 26 of file NameValueLabelPair.h.

References _valueLabel, setValue(), and string.

26 {return _valueLabel->text().toStdString();}
void dbutils::gui::NameValueLabelPair::setValue ( const std::string value)
slot

Member Data Documentation

QLabel* dbutils::gui::NameValueLabelPair::_valueLabel
private

Definition at line 34 of file NameValueLabelPair.h.

Referenced by getValue(), NameValueLabelPair(), and setValue().


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