-
Notifications
You must be signed in to change notification settings - Fork 0
/
editsermon.h
65 lines (48 loc) · 1.33 KB
/
editsermon.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef EDITSERMON_H
#define EDITSERMON_H
#include <QDialog>
#include <QSettings>
#include <QFileDialog>
#include <QDate>
#include <Qmessagebox>
#include <QUuid>
#include <QSqlRecord>
#include <QSqlField>
#include <QSqlTableModel>
#include <QDataWidgetMapper>
#include <QCloseEvent>
#include "mainwindow.h" //Includes sermon table enum
namespace Ui {
class EditSermon;
}
class EditSermon : public QDialog
{
Q_OBJECT
public:
explicit EditSermon(QSettings *settings, QSqlTableModel *mainWinTableModel, MainWindow *parent = 0, QString id = "", QPersistentModelIndex *index = new QPersistentModelIndex());
~EditSermon();
private slots:
void toFirstSermon();
void toPreviousSermon();
void toNextSermon();
void toLastSermon();
void on_pB_Close_clicked();
void on_pB_Browse_clicked();
void on_pB_Add_clicked();
void on_pB_Delete_clicked();
void closeEvent(QCloseEvent *event);
private:
Ui::EditSermon *ui;
QSettings *gsettings;
QStringList audioFileNames;
QSqlTableModel *sermonTableModel;
QDataWidgetMapper *sermonDataMapper;
MainWindow *parentWindow;
void UpdateRecordIndexLabel();
bool ValidateEntry();
void GenerateNewEntry();
void RemoveSermon(bool permanentlyDeleteFiles);
void RemoveEntry();
void UpdateAudioFileListing();
};
#endif // EDITSERMON_H