openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
720 B

#pragma once
#include <QLabel>
#include <QString>
#include <QWidget>
#include <QDialog>
#include <QLineEdit>
#include <QVBoxLayout>
#include "keyboard.hpp"
class InputDialog : public QDialog {
Q_OBJECT
public:
explicit InputDialog(QString prompt_text, QWidget* parent = 0);
static QString getText(QString prompt, int minLength = -1);
QString text();
void show();
void setMessage(QString message, bool clearInputField=true);
void setMinLength(int length);
private:
int minLength;
QLineEdit *line;
Keyboard *k;
QLabel *label;
QVBoxLayout *layout;
public slots:
int exec() override;
private slots:
void handleInput(QString s);
signals:
void cancel();
void emitText(QString text);
};