VAPOR3 3.9.4
VStringLineEdit.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4
5#include <string>
6#include <sstream>
7#include <iomanip>
8#include <QLineEdit>
9
10#include "VHBoxWidget.h"
11
12class QStringLineEdit;
13
18
20 Q_OBJECT
21
22public:
23 VStringLineEdit(std::string value = "");
24
26 void SetValueString(std::string value);
27
29 std::string GetValueString() const;
30
33
36
37 void SetReadOnly(bool b) { _lineEdit->setReadOnly(b); }
38 void Clear() { SetValueString(""); }
39
40 void SetAutoTooltip(bool on);
41
42private:
43 QLineEdit * _lineEdit;
44 std::string _strValue;
45 bool _autoTooltip = true;
46
47protected:
48 std::string _getText() const;
49
50protected slots:
51 virtual void _valueChanged();
52
53signals:
54 void ValueChanged(const std::string &value);
55};
A wrapper for a QLineEdit that handles user input of type string, and provides Vapor's standard sette...
void SetAutoTooltip(bool on)
void SetReadOnly(bool b)
void ValueChanged(const std::string &value)
std::string GetValueString() const
Get the current value in the line edit.
VStringLineEdit(std::string value="")
void SetValueString(std::string value)
Set the current string value in the line edit.
void RemoveContextMenu()
Remove the current context menu.
virtual void _valueChanged()
void SetCustomContextMenu()
Create a custom context menu for the QLineEdit.
std::string _getText() const