2013-06-04 21:51:27 +00:00
|
|
|
#ifndef SIMPLEWIDGETS_H
|
|
|
|
#define SIMPLEWIDGETS_H
|
|
|
|
|
|
|
|
class MinMaxAvgWidgetPrivate;
|
2013-06-17 16:41:00 +00:00
|
|
|
class QAbstractButton;
|
|
|
|
|
2013-06-04 21:51:27 +00:00
|
|
|
#include <QWidget>
|
2013-06-17 16:41:00 +00:00
|
|
|
#include <QDialog>
|
2014-03-25 17:54:37 +00:00
|
|
|
#include <stdint.h>
|
2013-06-04 21:51:27 +00:00
|
|
|
|
2013-10-03 22:38:49 +00:00
|
|
|
#include "ui_renumber.h"
|
2013-11-18 13:53:05 +00:00
|
|
|
#include "ui_shifttimes.h"
|
2014-01-27 13:44:26 +00:00
|
|
|
#include "ui_shiftimagetimes.h"
|
2014-02-13 15:43:55 +00:00
|
|
|
#include "exif.h"
|
2013-10-03 18:54:24 +00:00
|
|
|
|
2014-02-28 04:09:57 +00:00
|
|
|
class MinMaxAvgWidget : public QWidget {
|
2013-06-04 21:51:27 +00:00
|
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(double minimum READ minimum WRITE setMinimum)
|
|
|
|
Q_PROPERTY(double maximum READ maximum WRITE setMaximum)
|
|
|
|
Q_PROPERTY(double average READ average WRITE setAverage)
|
|
|
|
public:
|
|
|
|
MinMaxAvgWidget(QWidget *parent);
|
2013-11-30 17:18:02 +00:00
|
|
|
~MinMaxAvgWidget();
|
2013-06-04 21:51:27 +00:00
|
|
|
double minimum() const;
|
|
|
|
double maximum() const;
|
|
|
|
double average() const;
|
|
|
|
void setMinimum(double minimum);
|
|
|
|
void setMaximum(double maximum);
|
|
|
|
void setAverage(double average);
|
2014-02-28 04:09:57 +00:00
|
|
|
void setMinimum(const QString &minimum);
|
|
|
|
void setMaximum(const QString &maximum);
|
|
|
|
void setAverage(const QString &average);
|
2013-06-04 21:51:27 +00:00
|
|
|
void clear();
|
2014-02-28 04:09:57 +00:00
|
|
|
|
2013-06-04 21:51:27 +00:00
|
|
|
private:
|
2013-11-30 17:18:02 +00:00
|
|
|
QScopedPointer<MinMaxAvgWidgetPrivate> d;
|
2013-06-04 21:51:27 +00:00
|
|
|
};
|
|
|
|
|
2013-06-17 16:41:00 +00:00
|
|
|
class RenumberDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
static RenumberDialog *instance();
|
2014-05-19 21:11:32 +00:00
|
|
|
void renumberOnlySelected(bool selected = true);
|
2014-02-28 04:09:57 +00:00
|
|
|
private
|
|
|
|
slots:
|
2013-06-17 16:41:00 +00:00
|
|
|
void buttonClicked(QAbstractButton *button);
|
2014-02-28 04:09:57 +00:00
|
|
|
|
2013-06-17 16:41:00 +00:00
|
|
|
private:
|
2013-11-30 17:18:04 +00:00
|
|
|
explicit RenumberDialog(QWidget *parent);
|
2013-10-03 18:54:25 +00:00
|
|
|
Ui::RenumberDialog ui;
|
2014-05-19 21:11:32 +00:00
|
|
|
bool selectedOnly;
|
2013-06-17 16:41:00 +00:00
|
|
|
};
|
|
|
|
|
2013-11-18 13:53:05 +00:00
|
|
|
class ShiftTimesDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
static ShiftTimesDialog *instance();
|
2014-03-20 20:57:49 +00:00
|
|
|
void showEvent ( QShowEvent * event );
|
2014-02-28 04:09:57 +00:00
|
|
|
private
|
|
|
|
slots:
|
2013-11-18 13:53:05 +00:00
|
|
|
void buttonClicked(QAbstractButton *button);
|
2014-03-20 20:57:49 +00:00
|
|
|
void changeTime ();
|
2014-02-28 04:09:57 +00:00
|
|
|
|
2013-11-18 13:53:05 +00:00
|
|
|
private:
|
2013-11-30 17:18:04 +00:00
|
|
|
explicit ShiftTimesDialog(QWidget *parent);
|
2014-03-20 20:57:49 +00:00
|
|
|
int64_t when;
|
2013-11-18 13:53:05 +00:00
|
|
|
Ui::ShiftTimesDialog ui;
|
|
|
|
};
|
|
|
|
|
2014-01-27 13:44:26 +00:00
|
|
|
class ShiftImageTimesDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2014-02-08 22:56:47 +00:00
|
|
|
explicit ShiftImageTimesDialog(QWidget *parent);
|
2014-02-13 15:43:55 +00:00
|
|
|
time_t amount() const;
|
|
|
|
void setOffset(time_t offset);
|
|
|
|
time_t epochFromExiv(EXIFInfo *exif);
|
2014-02-28 04:09:57 +00:00
|
|
|
private
|
|
|
|
slots:
|
2014-01-27 13:44:26 +00:00
|
|
|
void buttonClicked(QAbstractButton *button);
|
2014-02-13 15:43:55 +00:00
|
|
|
void syncCameraClicked();
|
|
|
|
void dcDateTimeChanged(const QDateTime &);
|
2014-02-28 04:09:57 +00:00
|
|
|
|
2014-01-27 13:44:26 +00:00
|
|
|
private:
|
|
|
|
Ui::ShiftImageTimesDialog ui;
|
2014-02-13 15:43:55 +00:00
|
|
|
time_t m_amount;
|
|
|
|
time_t dcImageEpoch;
|
2014-01-27 13:44:26 +00:00
|
|
|
};
|
|
|
|
|
2013-09-27 15:52:01 +00:00
|
|
|
bool isGnome3Session();
|
|
|
|
|
2014-02-11 18:14:46 +00:00
|
|
|
#endif // SIMPLEWIDGETS_H
|