mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 04:54:18 +00:00
Allow to set placeholder for FileSystemPathEdit
This commit is contained in:
parent
5347897b7d
commit
b0e41abf5a
@ -247,6 +247,18 @@ void FileSystemPathEdit::setFileNameFilter(const QString &val)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString FileSystemPathEdit::placeholder() const
|
||||||
|
{
|
||||||
|
Q_D(const FileSystemPathEdit);
|
||||||
|
return d->m_editor->placeholder();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileSystemPathEdit::setPlaceholder(const QString &val)
|
||||||
|
{
|
||||||
|
Q_D(FileSystemPathEdit);
|
||||||
|
d->m_editor->setPlaceholder(val);
|
||||||
|
}
|
||||||
|
|
||||||
bool FileSystemPathEdit::briefBrowseButtonCaption() const
|
bool FileSystemPathEdit::briefBrowseButtonCaption() const
|
||||||
{
|
{
|
||||||
Q_D(const FileSystemPathEdit);
|
Q_D(const FileSystemPathEdit);
|
||||||
|
@ -71,6 +71,9 @@ public:
|
|||||||
QString fileNameFilter() const;
|
QString fileNameFilter() const;
|
||||||
void setFileNameFilter(const QString &val);
|
void setFileNameFilter(const QString &val);
|
||||||
|
|
||||||
|
QString placeholder() const;
|
||||||
|
void setPlaceholder(const QString &val);
|
||||||
|
|
||||||
/// The browse button caption is "..." if true, and "Browse" otherwise
|
/// The browse button caption is "..." if true, and "Browse" otherwise
|
||||||
bool briefBrowseButtonCaption() const;
|
bool briefBrowseButtonCaption() const;
|
||||||
void setBriefBrowseButtonCaption(bool brief);
|
void setBriefBrowseButtonCaption(bool brief);
|
||||||
|
@ -240,6 +240,16 @@ void Private::FileLineEdit::setValidator(QValidator *validator)
|
|||||||
QLineEdit::setValidator(validator);
|
QLineEdit::setValidator(validator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Private::FileLineEdit::placeholder() const
|
||||||
|
{
|
||||||
|
return placeholderText();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Private::FileLineEdit::setPlaceholder(const QString &val)
|
||||||
|
{
|
||||||
|
setPlaceholderText(val);
|
||||||
|
}
|
||||||
|
|
||||||
QWidget *Private::FileLineEdit::widget()
|
QWidget *Private::FileLineEdit::widget()
|
||||||
{
|
{
|
||||||
return this;
|
return this;
|
||||||
@ -346,6 +356,16 @@ void Private::FileComboEdit::setValidator(QValidator *validator)
|
|||||||
lineEdit()->setValidator(validator);
|
lineEdit()->setValidator(validator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Private::FileComboEdit::placeholder() const
|
||||||
|
{
|
||||||
|
return lineEdit()->placeholderText();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Private::FileComboEdit::setPlaceholder(const QString &val)
|
||||||
|
{
|
||||||
|
lineEdit()->setPlaceholderText(val);
|
||||||
|
}
|
||||||
|
|
||||||
void Private::FileComboEdit::setFilenameFilters(const QStringList &filters)
|
void Private::FileComboEdit::setFilenameFilters(const QStringList &filters)
|
||||||
{
|
{
|
||||||
static_cast<FileLineEdit *>(lineEdit())->setFilenameFilters(filters);
|
static_cast<FileLineEdit *>(lineEdit())->setFilenameFilters(filters);
|
||||||
|
@ -105,6 +105,8 @@ namespace Private
|
|||||||
virtual void setFilenameFilters(const QStringList &filters) = 0;
|
virtual void setFilenameFilters(const QStringList &filters) = 0;
|
||||||
virtual void setBrowseAction(QAction *action) = 0;
|
virtual void setBrowseAction(QAction *action) = 0;
|
||||||
virtual void setValidator(QValidator *validator) = 0;
|
virtual void setValidator(QValidator *validator) = 0;
|
||||||
|
virtual QString placeholder() const = 0;
|
||||||
|
virtual void setPlaceholder(const QString &val) = 0;
|
||||||
virtual QWidget *widget() = 0;
|
virtual QWidget *widget() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -121,6 +123,8 @@ namespace Private
|
|||||||
void setFilenameFilters(const QStringList &filters) override;
|
void setFilenameFilters(const QStringList &filters) override;
|
||||||
void setBrowseAction(QAction *action) override;
|
void setBrowseAction(QAction *action) override;
|
||||||
void setValidator(QValidator *validator) override;
|
void setValidator(QValidator *validator) override;
|
||||||
|
QString placeholder() const override;
|
||||||
|
void setPlaceholder(const QString &val) override;
|
||||||
QWidget *widget() override;
|
QWidget *widget() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -149,6 +153,8 @@ namespace Private
|
|||||||
void setFilenameFilters(const QStringList &filters) override;
|
void setFilenameFilters(const QStringList &filters) override;
|
||||||
void setBrowseAction(QAction *action) override;
|
void setBrowseAction(QAction *action) override;
|
||||||
void setValidator(QValidator *validator) override;
|
void setValidator(QValidator *validator) override;
|
||||||
|
QString placeholder() const override;
|
||||||
|
void setPlaceholder(const QString &val) override;
|
||||||
QWidget *widget() override;
|
QWidget *widget() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user