doxygen documentation

master
Herwig Birke 6 years ago
parent 30a726f8a6
commit eee85fcff5

2511
Doxyfile

File diff suppressed because it is too large Load Diff

@ -1,3 +1,8 @@
/*!
\file cexportdialog.cpp
*/
#include "cexportdialog.h"
#include "ui_cexportdialog.h"

@ -1,3 +1,8 @@
/*!
\file cexportdialog.h
*/
#ifndef CEXPORTDIALOG_H
#define CEXPORTDIALOG_H
@ -24,31 +29,104 @@ namespace Ui {
class cExportDialog;
}
/*!
\brief
\class cExportDialog cexportdialog.h "cexportdialog.h"
*/
class cExportDialog : public QDialog
{
Q_OBJECT
public:
/*!
\brief
\fn cExportDialog
\param imageFormats
\param parent
*/
explicit cExportDialog(const QList<IMAGEFORMAT>& imageFormats, QWidget *parent = nullptr);
/*!
\brief
\fn ~cExportDialog
*/
~cExportDialog();
private:
Ui::cExportDialog *ui;
Ui::cExportDialog *ui; /*!< TODO: describe */
/*!
\brief
\fn accept
*/
void accept();
/*!
\brief
\fn reject
*/
void reject();
/*!
\brief
\fn saveSettings
*/
void saveSettings();
/*!
\brief
\fn initUI
\param imageFormats
*/
void initUI(const QList<IMAGEFORMAT>& imageFormats);
/*!
\brief
\fn createActions
*/
void createActions();
private slots:
/*!
\brief
\fn onQualityChanged
\param value
*/
void onQualityChanged(int value);
/*!
\brief
\fn onDirectoryMethodChanged
\param id
*/
void onDirectoryMethodChanged(int id);
/*!
\brief
\fn onFileMethodChanged
\param id
*/
void onFileMethodChanged(int id);
/*!
\brief
\fn onFileNamePlusChanged
\param id
*/
void onFileNamePlusChanged(int id);
/*!
\brief
\fn onFileOverwriteMethodChanged
\param id
*/
void onFileOverwriteMethodChanged(int id);
protected:

@ -1,3 +1,8 @@
/*!
\file cfiledialog.cpp
*/
#include "cfiledialog.h"
#include <QGridLayout>

@ -1,3 +1,8 @@
/*!
\file cfiledialog.h
*/
#ifndef CFILEDIALOG_H
#define CFILEDIALOG_H
@ -6,19 +11,53 @@
#include <QCheckBox>
/*!
\brief
\class cFileDialog cfiledialog.h "cfiledialog.h"
*/
class cFileDialog : public QFileDialog
{
public:
cFileDialog(QWidget *parent = nullptr, const QString &caption = QString(), const QString &directory = QString(), const QString &filter = QString());
/*!
\brief
\fn cFileDialog
\param parent
\param flags
*/
cFileDialog(QWidget *parent, Qt::WindowFlags flags);
/*!
\brief
\fn addCheckbox
*/
void addCheckbox();
/*!
\brief
\fn setChecked
\param check
*/
void setChecked(bool check);
/*!
\brief
\fn checked
\return bool
*/
bool checked();
private:
QCheckBox* m_lpCheckBox;
QCheckBox* m_lpCheckBox; /*!< TODO: describe */
/*!
\brief
\fn init
*/
void init();
};

@ -13,23 +13,121 @@
#include <QImage>
/*!
\brief
\class cImage cimage.h "cimage.h"
*/
class cImage : public QImage
{
public:
cImage();
/*!
\brief
\fn cImage
\param size
\param format
*/
cImage(const QSize &size, QImage::Format format);
/*!
\brief
\fn cImage
\param width
\param height
\param format
*/
cImage(int width, int height, QImage::Format format);
/*!
\brief
\fn cImage
\param data
\param width
\param height
\param format
\param cleanupFunction
\param cleanupInfo
*/
cImage(uchar *data, int width, int height, QImage::Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);
/*!
\brief
\fn cImage
\param data
\param width
\param height
\param format
\param cleanupFunction
\param cleanupInfo
*/
cImage(const uchar *data, int width, int height, QImage::Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);
/*!
\brief
\fn cImage
\param data
\param width
\param height
\param bytesPerLine
\param format
\param cleanupFunction
\param cleanupInfo
*/
cImage(uchar *data, int width, int height, int bytesPerLine, QImage::Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);
/*!
\brief
\fn cImage
\param data
\param width
\param height
\param bytesPerLine
\param format
\param cleanupFunction
\param cleanupInfo
*/
cImage(const uchar *data, int width, int height, int bytesPerLine, QImage::Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);
/*!
\brief
\fn cImage
\param fileName
\param format
*/
cImage(const QString &fileName, const char *format = nullptr);
/*!
\brief
\fn cImage
\param image
*/
cImage(const QImage &image);
/*!
\brief
\fn cImage
\param other
*/
cImage(QImage &&other);
/*!
\brief
\fn load
\param fileName
\param format
\return bool
*/
bool load(const QString &fileName, const char *format = nullptr);
protected:
/*!
\brief
\enum Cam
*/
enum Cam
{
camera_unknown = 0,
@ -39,6 +137,13 @@ protected:
};
template <typename num>
/*!
\brief
\fn clip
\param val
\return num
*/
num clip(float val) const
{
int vr = qRound(val);
@ -54,6 +159,13 @@ protected:
}
template <typename num>
/*!
\brief
\fn clip
\param val
\return num
*/
num clip(double val) const
{
int vr = qRound(val);
@ -69,6 +181,13 @@ protected:
}
template <typename num>
/*!
\brief
\fn clip
\param val
\return num
*/
num clip(int val) const
{
int vr = qRound(static_cast<double>(val));
@ -84,22 +203,101 @@ protected:
}
private:
bool m_isChromatic;
Cam m_camType;
bool m_isChromatic; /*!< TODO: describe */
Cam m_camType; /*!< TODO: describe */
/*!
\brief
\fn loadRAW
\param fileName
\return bool
*/
bool loadRAW(const QString &fileName);
/*!
\brief
\fn openBuffer
\param fileName
\param ba
\param iProcessor
\return bool
*/
bool openBuffer(const QString &fileName, const QSharedPointer<QByteArray>& ba, LibRaw& iProcessor);
/*!
\brief
\fn detectSpecialCamera
\param iProcessor
*/
void detectSpecialCamera(const LibRaw & iProcessor);
/*!
\brief
\fn demosaic
\param iProcessor
\return cv::Mat
*/
cv::Mat demosaic(LibRaw & iProcessor);
/*!
\brief
\fn prepareImg
\param iProcessor
\return cv::Mat
*/
cv::Mat prepareImg(const LibRaw & iProcessor);
/*!
\brief
\fn whiteBalance
\param iProcessor
\param img
*/
void whiteBalance(const LibRaw & iProcessor, cv::Mat & img);
/*!
\brief
\fn whiteMultipliers
\param iProcessor
\return cv::Mat
*/
cv::Mat whiteMultipliers(const LibRaw & iProcessor);
/*!
\brief
\fn gammaCorrection
\param iProcessor
\param img
*/
void gammaCorrection(const LibRaw & iProcessor, cv::Mat& img);
/*!
\brief
\fn gammaTable
\param iProcessor
\return cv::Mat
*/
cv::Mat gammaTable(const LibRaw & iProcessor);
/*!
\brief
\fn raw2Img
\param iProcessor
\param img
\return QImage
*/
QImage raw2Img(const LibRaw & iProcessor, cv::Mat & img);
/*!
\brief
\fn mat2QImage
\param img
\return QImage
*/
QImage mat2QImage(cv::Mat img);
};

@ -1,3 +1,8 @@
/*!
\file cmainwindow.cpp
*/
#include "cmainwindow.h"
#include "ui_cmainwindow.h"
@ -393,7 +398,9 @@ void cMainWindow::onConvert()
if(exportDialog.exec() == QDialog::Rejected)
return;
m_working = true;
doExport();
m_working = false;
}
void cMainWindow::onThumbnailSize(int size)
@ -405,7 +412,7 @@ void cMainWindow::onThumbnailSize(int size)
void cMainWindow::doExport()
{
EXPORTSETTINGS exportSettings;
bool overwriteAll = false;
OVERWRITE overwrite = OVERWRITE_ASK;
getExportSettings(exportSettings);
@ -423,7 +430,7 @@ void cMainWindow::doExport()
if(!lpExif)
continue;
overwriteAll = exportFile(exportSettings, lpExif, overwriteAll);
overwrite = exportFile(exportSettings, lpExif, overwrite);
m_lpProgressBar->setValue(i);
qApp->processEvents();
@ -482,7 +489,7 @@ void cMainWindow::getExportSettings(EXPORTSETTINGS& exportSettings)
exportSettings.quality = settings.value("export/quality", QVariant::fromValue(50)).toInt();
}
bool cMainWindow::exportFile(const EXPORTSETTINGS& exportSettings, cEXIF* lpExif, bool overwriteAll)
OVERWRITE cMainWindow::exportFile(const EXPORTSETTINGS& exportSettings, cEXIF* lpExif, OVERWRITE overwrite)
{
QString destPath;
QString destFile;
@ -528,17 +535,22 @@ bool cMainWindow::exportFile(const EXPORTSETTINGS& exportSettings, cEXIF* lpExif
destFile.prepend(destPath + "/");
QFileInfo destInfo(destFile);
if(destInfo.exists() && !overwriteAll)
if(destInfo.exists() && overwrite != OVERWRITE_ALL)
{
switch(exportSettings.fileOverwrite)
{
case FILE_OVERWRITE_ASK:
{
QMessageBox::StandardButton ret = QMessageBox::question(this, tr("File Exists"), QString(tr("File %1 exists. Do you want to overwrite?")).arg(destFile), QMessageBox::Yes | QMessageBox::No | QMessageBox::YesAll);
QMessageBox::StandardButton ret = QMessageBox::question(this, tr("File Exists"), QString(tr("File %1 exists. Do you want to overwrite?")).arg(destFile), QMessageBox::Yes | QMessageBox::No | QMessageBox::YesAll | QMessageBox::NoAll);
if(ret == QMessageBox::YesAll)
overwriteAll = true;
overwrite = OVERWRITE_ALL;
else if(ret == QMessageBox::NoAll)
{
overwrite = OVERWRITE_NONE;
return(overwrite);
}
else if(ret == QMessageBox::No)
return(overwriteAll);
return(overwrite);
}
break;
case FILE_OVERWRITE_RENAME:
@ -546,13 +558,15 @@ bool cMainWindow::exportFile(const EXPORTSETTINGS& exportSettings, cEXIF* lpExif
if(destFile.isEmpty())
{
QMessageBox::information(this, tr("File Export"), QString("%1 cannot be renamed.").arg(lpExif->fileName()));
return(overwriteAll);
return(overwrite);
}
break;
case FILE_OVERWRITE_OVERWRITE:
break;
}
}
else if(overwrite == OVERWRITE_NONE)
return(overwrite);
ui->m_lpStatusBar->showMessage(QString(tr("loading %1...")).arg(lpExif->fileName()));
qApp->processEvents();
@ -577,7 +591,7 @@ bool cMainWindow::exportFile(const EXPORTSETTINGS& exportSettings, cEXIF* lpExif
}
}
return(overwriteAll);
return(overwrite);
}
QString cMainWindow::replaceTags(const QString& path, cEXIF* lpExif, const QString& extension, bool directory)

@ -1,3 +1,8 @@
/*!
\file cmainwindow.h
*/
#ifndef CMAINWINDOW_H
#define CMAINWINDOW_H
@ -20,6 +25,11 @@ namespace Ui { class cMainWindow; }
QT_END_NAMESPACE
/*!
\brief
\enum DIRECTORY_METHOD
*/
enum DIRECTORY_METHOD
{
DIRECTORY_METHOD_KEEP = 1,
@ -27,12 +37,22 @@ enum DIRECTORY_METHOD
DIRECTORY_METHOD_TAG = 3,
};
/*!
\brief
\enum FILE_METHOD
*/
enum FILE_METHOD
{
FILE_METHOD_KEEP = 1,
FILE_METHOD_RENAME = 2,
};
/*!
\brief
\enum FILE_OVERWRITE
*/
enum FILE_OVERWRITE
{
FILE_OVERWRITE_ASK = 1,
@ -40,78 +60,253 @@ enum FILE_OVERWRITE
FILE_OVERWRITE_OVERWRITE = 3,
};
/*!
\brief
\enum FILE_ADD
*/
enum FILE_ADD
{
FILE_ADD_CONVERTED = 1,
FILE_ADD_TAG = 2,
};
/*!
\brief
\class tagEXPORTSETTINGS cmainwindow.h "cmainwindow.h"
*/
typedef struct tagEXPORTSETTINGS
{
DIRECTORY_METHOD directoryMethod;
QString directory;
bool keepStructure;
QString directoryTag;
FILE_METHOD fileMethod;
FILE_ADD fileAdd;
QString fileTag;
FILE_OVERWRITE fileOverwrite;
QString fileFormat;
int quality;
DIRECTORY_METHOD directoryMethod; /*!< TODO: describe */
QString directory; /*!< TODO: describe */
bool keepStructure; /*!< TODO: describe */
QString directoryTag; /*!< TODO: describe */
FILE_METHOD fileMethod; /*!< TODO: describe */
FILE_ADD fileAdd; /*!< TODO: describe */
QString fileTag; /*!< TODO: describe */
FILE_OVERWRITE fileOverwrite; /*!< TODO: describe */
QString fileFormat; /*!< TODO: describe */
int quality; /*!< TODO: describe */
/*!
\brief
\typedef EXPORTSETTINGS*/
} EXPORTSETTINGS;
/*!
\brief
\enum OVERWRITE
*/
enum OVERWRITE
{
OVERWRITE_ASK = 0,
OVERWRITE_NONE = 1,
OVERWRITE_ALL = 2,
};
/*!
\brief
\class cMainWindow cmainwindow.h "cmainwindow.h"
*/
class cMainWindow : public QMainWindow
{
Q_OBJECT
public:
cMainWindow(cSplashScreen* lpSplashScreen, QWidget *parent = nullptr);
/*!
\brief
\fn ~cMainWindow
*/
~cMainWindow();
private:
Ui::cMainWindow* ui;
cSplashScreen* m_lpSplashScreen; /*!< TODO: describe */
QStandardItemModel* m_lpFileListModel;
QProgressBar* m_lpProgressBar; /*!< TODO: describe */
Ui::cMainWindow* ui; /*!< TODO: describe */
cSplashScreen* m_lpSplashScreen; /*!< TODO: describe */
QStandardItemModel* m_lpFileListModel; /*!< TODO: describe */
QProgressBar* m_lpProgressBar; /*!< TODO: describe */
QMimeDatabase m_mimeDB;
QList<IMAGEFORMAT> m_imageFormats;
bool m_working;
bool m_working; /*!< TODO: describe */
/*!
\brief
\fn initUI
*/
void initUI();
/*!
\brief
\fn createActions
*/
void createActions();
/*!
\brief
\fn createFileActions
*/
void createFileActions();
/*!
\brief
\fn createContextActions
*/
void createContextActions();
/*!
\brief
\fn addPath
\param path
\param recursive
*/
void addPath(const QString& path, bool recursive = true);
/*!
\brief
\fn addFile
\param file
*/
void addFile(const QString& file);
/*!
\brief
\fn isInList
\param file
\return bool
*/
bool isInList(const QString& file);
/*!
\brief
\fn doExport
*/
void doExport();
/*!
\brief
\fn getExportSettings
\param exportSettings
*/
void getExportSettings(EXPORTSETTINGS& exportSettings);
bool exportFile(const EXPORTSETTINGS& exportSettings, cEXIF* lpExif, bool overwriteAll);
/*!
\brief
\fn exportFile
\param exportSettings
\param lpExif
\param overwrite
\return OVERWRITE
*/
OVERWRITE exportFile(const EXPORTSETTINGS& exportSettings, cEXIF* lpExif, OVERWRITE overwrite);
/*!
\brief
\fn replaceTags
\param path
\param lpExif
\param extension
\param directory
\return QString
*/
QString replaceTags(const QString& path, cEXIF* lpExif, const QString& extension = QString(""), bool directory = true);
/*!
\brief
\fn findFreeFileName
\param fileName
\return QString
*/
QString findFreeFileName(const QString& fileName);
/*!
\brief
\fn setImageFormats
*/
void setImageFormats();
/*!
\brief
\fn addImageFormat
\param shortName
\param description
\param extension
\param readList
\param writeList
*/
void addImageFormat(const char* shortName, const char* description, const char* extension, QList<QByteArray>& readList, QList<QByteArray>& writeList);
private slots:
/*!
\brief
\fn onAddFile
*/
void onAddFile();
/*!
\brief
\fn onAddFolder
*/
void onAddFolder();
/*!
\brief
\fn onRemoveSelected
*/
void onRemoveSelected();
/*!
\brief
\fn onClearList
*/
void onClearList();
/*!
\brief
\fn onConvert
*/
void onConvert();
/*!
\brief
\fn onThumbnailSize
\param size
*/
void onThumbnailSize(int size);
/*!
\brief
\fn onAddEntrys
\param fileList
*/
void onAddEntrys(const QStringList& fileList);
/*!
\brief
\fn onDeleteEntrys
*/
void onDeleteEntrys();
protected:
/*!
\brief
\fn closeEvent
\param event
*/
void closeEvent(QCloseEvent* event);
};
#endif // CMAINWINDOW_H

@ -1,3 +1,8 @@
/*!
\file common.cpp
*/
#include "common.h"

@ -1,3 +1,8 @@
/*!
\file common.h
*/
#ifndef COMMON_H
#define COMMON_H
@ -18,17 +23,40 @@
#endif
/*!
\brief
\class tagIMAGEFORMAT common.h "common.h"
*/
typedef struct tagIMAGEFORMAT
{
QString shortName;
QString description;
QString extension;
bool read;
bool write;
QString shortName; /*!< TODO: describe */
QString description; /*!< TODO: describe */
QString extension; /*!< TODO: describe */
bool read; /*!< TODO: describe */
bool write; /*!< TODO: describe */
/*!
\brief
\typedef IMAGEFORMAT*/
} IMAGEFORMAT;
/*!
\brief
\fn generateReadList
\param imageFormats
\return QString
*/
QString generateReadList(const QList<IMAGEFORMAT>& imageFormats);
/*!
\brief
\fn generateWriteList
\param imageFormats
\return QString
*/
QString generateWriteList(const QList<IMAGEFORMAT>& imageFormats);

@ -1,3 +1,8 @@
/*!
\file ctreeview.cpp
*/
#include "ctreeview.h"
#include <QDropEvent>

@ -1,3 +1,8 @@
/*!
\file ctreeview.h
*/
#ifndef CTREEVIEW_H
#define CTREEVIEW_H
@ -10,6 +15,11 @@
#include <QStandardItem>
/*!
\brief
\class cTreeView ctreeview.h "ctreeview.h"
*/
class cTreeView : public QTreeView
{
Q_OBJECT
@ -18,16 +28,57 @@ public:
cTreeView(QWidget* parent = Q_NULLPTR);
protected:
/*!
\brief
\fn dragEnterEvent
\param event
*/
void dragEnterEvent(QDragEnterEvent *event) override;
/*!
\brief
\fn dropEvent
\param event
*/
void dropEvent(QDropEvent *event) override;
/*!
\brief
\fn dragMoveEvent
\param event
*/
void dragMoveEvent(QDragMoveEvent *event) override;
/*!
\brief
\fn dragLeaveEvent
\param event
*/
void dragLeaveEvent(QDragLeaveEvent *event) override;
/*!
\brief
\fn keyPressEvent
\param event
*/
void keyPressEvent(QKeyEvent *event) override;
private:
signals:
/*!
\brief
\fn addEntrys
\param fileList
*/
void addEntrys(const QStringList& fileList);
/*!
\brief
\fn deleteEntrys
*/
void deleteEntrys();
};

@ -1,3 +1,8 @@
/*!
\file main.cpp
*/
#include "cmainwindow.h"
#include <QApplication>

@ -78,6 +78,7 @@ RESOURCES += \
qdarkstyle/style.qrc
DISTFILES += \
Doxyfile \
README.md \
LICENSE \
fileFormats.xlsx \

Loading…
Cancel
Save