34#include <NDEVR/QCustomStackedWidget.h>
35#include <NDEVR/File.h>
36#include <NDEVR/FileFormat.h>
37#include <NDEVR/Buffer.h>
38#include <NDEVR/UUID.h>
39#include <NDEVR/INIInterface.h>
45#if NDEVR_SUPPORTS_THREADING
53 class QCustomTableWidget;
57 class QCustomLineEdit;
58 class QCustomComboBox;
59 class QCustomMessageBox;
60 class FolderCreatorWidget;
64 QPointer<QCustomTableWidget>
table;
71#if NDEVR_SUPPORTS_THREADING
72 friend class ImageCacheThread;
84 QSize sizeHint()
const override;
92 void setCurrentDirectory(
const File& current_directory);
93 void setFallbackDirectory(
const File& file);
96 void showModifiedTime(
bool show_modified_time);
97 void showAccessedTime(
bool show_accessed_time);
98 void showFileSize(
bool show_modified_time);
99 void setShowRecents(
bool show_recent);
100 void setCurrentFileName(
const String& name);
101 void setCurrentFile(
const File& file);
102 void setCurrentExtension(
const String& extension,
bool update_format_to_first_match);
103 bool event(QEvent* e)
override;
104 bool isFolderBrowser()
const;
106 bool showFavorites()
const;
107 void prepareForINI(
INIFactory& factory)
override;
108 void finishReadingINI(
INIFactory& factory)
override;
109 void selectFileNameField();
112 void setIconProvider(
const std::function<
String(
const FileRequest&)>& icon_provider);
113 void setCanReadCallback(
const std::function<
bool(
const FileFormat&,
const File&)>& callback);
117 void addToRecents(
const File& file);
121 void setNativeParent(QWidget* native_parent);
123 void postResolveIcons();
124 void browseFileNative();
126 void updateGallery(
Button* b);
127 void hidePopupDialog();
128 void autoSelectFavoritesItem();
130 void updateBrowserWidgets();
131 void SetupForBrowser();
132 void SetupForFavorites();
133 QWidget* createRequestWidget(
File item);
134 QWidget* createNavigationButtons();
135 QWidget* createBottomPanel();
136 QWidget* createfavoritesPanel();
137 QWidget* settingsDialog();
138 String extensionsString(
const String& delimiter =
";;")
const;
140 void removeFromRecents(
File item);
144 FileFormat getFileFormat(
const QString& file,
const QString&
string)
const;
148 bool checkFileAgainstFilter(
const File& file,
const FileFormat& selected_format)
const;
151 void setIsFileChooser(
bool is_file_chooser);
152 void onFileChosen(
File file);
154 void contextMenu(
const QPoint &pos);
155 void browsingFinished();
156 void updateFilesSlot();
163 QIcon _getIconCallback(
const File& file);
165 void _setCurrentDirectory(
const File& dir);
166 void onUserReadyToFinish(
bool was_browsing);
168 void setFileIcon(
File file, QIcon icon);
171 virtual void getINI(
INIFactory& factory)
override;
172 bool getSelectedFilters(QString & selected_filter, QString & default_suffix);
174 void resolveIcon(
const File& file);
182 File m_current_directory;
183 File m_fallback_directory;
184 String m_current_file_name;
185 String m_current_file_extension;
188 QHBoxLayout* m_top_layout;
191 bool m_show_recents =
true;
192 bool m_touch_prefer_gallery =
true;
193 bool m_desktop_prefer_gallery =
false;
194 bool m_show_hidden =
false;
195 bool m_show_extensions =
true;
196 bool m_show_favorites;
204 Button* m_database_button;
207 Button* m_new_folder_button;
208 Button* m_up_level_button;
209 Button* m_favorites_button;
210 QWidget* m_navigation_buttons;
211 QWidget* m_bottom_buttons;
212 QWidget* m_favorites_panel;
220 QIcon m_loading_icon;
221 QWidget* m_popup_dialog;
222 QWidget* m_settings_dialog;
227#if NDEVR_SUPPORTS_THREADING
228 QThread* m_icon_thread =
nullptr;
230 QWidget* m_native_parent =
nullptr;
232 std::function<bool(
const FileFormat&,
const File&)> m_can_read_callback;
237 bool m_neeeds_to_update =
false;
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Dictionary.h:48
Definition FileChooserDialog.h:68
void setSaveContent(const Buffer< UUID > &save_content)
Definition FileChooserDialog.h:94
void setAllowAny(bool allow_any)
Definition FileChooserDialog.h:90
bool isSaveDialog() const
Definition FileChooserDialog.h:91
DisplayMode
Definition FileChooserDialog.h:75
bool m_allow_any
Definition FileChooserDialog.h:235
void onFileChoosenSignal()
const File & currentDirectory() const
Definition FileChooserDialog.h:120
Buffer< FileRequest > m_selected_files
Definition FileChooserDialog.h:234
bool showRecents() const
Definition FileChooserDialog.h:105
const Buffer< UUID > & saveContent() const
Definition FileChooserDialog.h:95
Definition INIReader.h:57
Definition INIInterface.h:40
Definition QCustomCombobox.h:47
Definition QCustomLineEdit.h:118
Definition QCustomMessageBox.h:54
Definition TranslatedString.h:9
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
Definition BaseValues.hpp:272
Definition FileFormat.h:67