20#ifndef LIBREPCB_EDITOR_IMAGEHELPERS_H
21#define LIBREPCB_EDITOR_IMAGEHELPERS_H
38class TransactionalDirectory;
99 QString nameUserInput,
100 const QString& extension);
124 const QString& settingsKey);
145 const QString& format,
const QString& basename,
bool& exists);
181 QString& basename) noexcept;
The Project class represents a whole (opened) project with all its content.
Definition project.h:71
Helper class to access a subdirectory of TransactionalFileSystem.
Definition transactionaldirectory.h:51
Various editor helper functions for working with librepcb::Image.
Definition imagehelpers.h:51
static bool isImageInClipboard() noexcept
Check if the clipboard contains any kind of image.
Definition imagehelpers.cpp:214
static bool getImageFromClipboard(QByteArray &data, QString &format, QString &basename) noexcept
Try to get the image from the clipboard.
Definition imagehelpers.cpp:241
ImageHelpers & operator=(const ImageHelpers &rhs)=delete
static std::optional< FileProofName > findExistingOrAskForNewImageFileName(const TransactionalDirectory &dir, Target target, const QByteArray &data, const QString &format, const QString &basename, bool &exists)
Determine the filename of an image to be added to a directory.
Definition imagehelpers.cpp:173
Target
Definition imagehelpers.h:56
static std::optional< FileProofName > findExistingFile(const TransactionalDirectory &dir, const QByteArray &data)
Find a file with specific content in a directory.
Definition imagehelpers.cpp:100
static bool execImageChooserDialog(QByteArray &data, QString &format, QString &basename, const QString &settingsKey)
Execute "open file" dialog to choose an image.
Definition imagehelpers.cpp:138
ImageHelpers(const ImageHelpers &other)=delete
static FileProofName getUnusedFileName(const TransactionalDirectory &dir, QString nameUserInput, const QString &extension)
Build a valid filename for an image file to be created.
Definition imagehelpers.cpp:113
Definition occmodel.cpp:77
type_safe::constrained_type< QString, FileProofNameConstraint, FileProofNameVerifier > FileProofName
Definition fileproofname.h:90