Files
Sourcetrail/src/lib_gui/qt/element/QtLocationPicker.h
T
Eberhard Graether 503ca76a40 ui: Use window decorations on dialog windows (issue #376)
* added SubWindow flag to QtWindow to either use window decorations or show window within main window
* fixes black borders in some Linux window managers

bug id = 376

fortune cookie message = Your skill will accomplish what the force of many others cannot.
2017-06-07 14:40:16 +02:00

50 lines
892 B
C++

#ifndef QT_LOCATION_PICKER_H
#define QT_LOCATION_PICKER_H
#include <QPushButton>
#include "qt/element/QtLineEdit.h"
#include "utility/file/FilePath.h"
class QtLocationPicker
: public QWidget
{
Q_OBJECT
public:
QtLocationPicker(QWidget *parent);
virtual void paintEvent(QPaintEvent*) override;
void setPlaceholderText(QString text);
QString getText();
void setText(QString text);
void clearText();
bool pickDirectory() const;
void setPickDirectory(bool pickDirectory);
void setFileFilter(const QString& fileFilter);
void setRelativeRootDirectory(const FilePath& dir);
signals:
void locationPicked();
protected:
void changeEvent(QEvent *event) override;
private slots:
void handleButtonPress();
private:
QPushButton* m_button;
QtLineEdit* m_data;
bool m_pickDirectory;
QString m_fileFilter;
FilePath m_relativeRootDirectory;
};
#endif // QT_LOCATION_PICKER_H