Files
Sourcetrail/src/lib_gui/qt/element/QtLocationPicker.h
T
Eberhard Graether 9256618f7c ui: Extended project setup to support creation and editing of Source Groups (issue #230)
* Turned QtProjectWizzard into window for Source Group ui
* Clicking into FilePicker when empty will open dialog right away
* Fixed environment variable use throughout all Source Group path values
* Moved Preferences to QtPreferencesWindow

bug id = 230

fortune cookie message = Zwischen dir und deinen Freunden besteht echte Freundschaft.
2017-05-29 17:08:28 +02:00

51 lines
913 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();
void handleFocus();
private:
QPushButton* m_button;
QtLineEdit* m_data;
bool m_pickDirectory;
QString m_fileFilter;
FilePath m_relativeRootDirectory;
};
#endif // QT_LOCATION_PICKER_H