Browse Source

Rename interface

adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
f7ae010274
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 8
      src/gui/fspathedit.cpp
  2. 4
      src/gui/fspathedit.h
  3. 8
      src/gui/fspathedit_p.h

8
src/gui/fspathedit.cpp

@ -70,14 +70,14 @@ class FileSystemPathEdit::FileSystemPathEditPrivate @@ -70,14 +70,14 @@ class FileSystemPathEdit::FileSystemPathEditPrivate
Q_DECLARE_PUBLIC(FileSystemPathEdit)
Q_DISABLE_COPY_MOVE(FileSystemPathEditPrivate)
FileSystemPathEditPrivate(FileSystemPathEdit *q, Private::FileEditorWithCompletion *editor);
FileSystemPathEditPrivate(FileSystemPathEdit *q, Private::IFileEditorWithCompletion *editor);
void modeChanged();
void browseActionTriggered();
QString dialogCaptionOrDefault() const;
FileSystemPathEdit *q_ptr = nullptr;
std::unique_ptr<Private::FileEditorWithCompletion> m_editor;
std::unique_ptr<Private::IFileEditorWithCompletion> m_editor;
QAction *m_browseAction = nullptr;
QToolButton *m_browseBtn = nullptr;
QString m_fileNameFilter;
@ -88,7 +88,7 @@ class FileSystemPathEdit::FileSystemPathEditPrivate @@ -88,7 +88,7 @@ class FileSystemPathEdit::FileSystemPathEditPrivate
};
FileSystemPathEdit::FileSystemPathEditPrivate::FileSystemPathEditPrivate(
FileSystemPathEdit *q, Private::FileEditorWithCompletion *editor)
FileSystemPathEdit *q, Private::IFileEditorWithCompletion *editor)
: q_ptr {q}
, m_editor {editor}
, m_browseAction {new QAction(q)}
@ -183,7 +183,7 @@ void FileSystemPathEdit::FileSystemPathEditPrivate::modeChanged() @@ -183,7 +183,7 @@ void FileSystemPathEdit::FileSystemPathEditPrivate::modeChanged()
m_validator->setCheckWritePermission((m_mode == FileSystemPathEdit::Mode::FileSave) || (m_mode == FileSystemPathEdit::Mode::DirectorySave));
}
FileSystemPathEdit::FileSystemPathEdit(Private::FileEditorWithCompletion *editor, QWidget *parent)
FileSystemPathEdit::FileSystemPathEdit(Private::IFileEditorWithCompletion *editor, QWidget *parent)
: QWidget(parent)
, d_ptr(new FileSystemPathEditPrivate(this, editor))
{

4
src/gui/fspathedit.h

@ -35,8 +35,8 @@ @@ -35,8 +35,8 @@
namespace Private
{
class FileComboEdit;
class FileEditorWithCompletion;
class FileLineEdit;
class IFileEditorWithCompletion;
}
/*!
@ -92,7 +92,7 @@ signals: @@ -92,7 +92,7 @@ signals:
void selectedPathChanged(const Path &path);
protected:
explicit FileSystemPathEdit(Private::FileEditorWithCompletion *editor, QWidget *parent);
explicit FileSystemPathEdit(Private::IFileEditorWithCompletion *editor, QWidget *parent);
template <class Widget>
Widget *editWidget() const

8
src/gui/fspathedit_p.h

@ -95,10 +95,10 @@ namespace Private @@ -95,10 +95,10 @@ namespace Private
mutable QValidator::State m_lastValidationState = QValidator::Invalid;
};
class FileEditorWithCompletion
class IFileEditorWithCompletion
{
public:
virtual ~FileEditorWithCompletion() = default;
virtual ~IFileEditorWithCompletion() = default;
virtual void completeDirectoriesOnly(bool completeDirsOnly) = 0;
virtual void setFilenameFilters(const QStringList &filters) = 0;
virtual void setBrowseAction(QAction *action) = 0;
@ -108,7 +108,7 @@ namespace Private @@ -108,7 +108,7 @@ namespace Private
virtual QWidget *widget() = 0;
};
class FileLineEdit final : public QLineEdit, public FileEditorWithCompletion
class FileLineEdit final : public QLineEdit, public IFileEditorWithCompletion
{
Q_OBJECT
Q_DISABLE_COPY_MOVE(FileLineEdit)
@ -140,7 +140,7 @@ namespace Private @@ -140,7 +140,7 @@ namespace Private
QFileIconProvider m_iconProvider;
};
class FileComboEdit final : public QComboBox, public FileEditorWithCompletion
class FileComboEdit final : public QComboBox, public IFileEditorWithCompletion
{
Q_OBJECT
Q_DISABLE_COPY_MOVE(FileComboEdit)

Loading…
Cancel
Save