-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJobController.h
More file actions
47 lines (32 loc) · 931 Bytes
/
JobController.h
File metadata and controls
47 lines (32 loc) · 931 Bytes
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
/*
* JobController.h
*
* Created on: 14 Feb 2012
* Author: Max Foster
*/
#ifndef JOBCONTROLLER_H
#define JOBCONTROLLER_H
#include "Database.h"
class QWidget;
class Job;
class Part;
class Task;
namespace JobController
{
void Index(const QDate &date, QWidget *caller);
void Show(int jobId, QWidget *caller);
void Show(Job &job, QWidget *caller);
Job New(QWidget *caller);
void Edit(int jobId, QWidget *caller);
void Edit(Job &job, QWidget *caller);
bool Create(Job &jobAttributes, QWidget *caller);
bool Update(const Job &job, QWidget *caller);
bool Destroy(int jobId, QWidget *caller);
bool Destroy(Job &job, QWidget *caller);
Job getJob(int jobId);
Database<Job>::recordListPtr getAllJobs();
Database<Part>::recordListPtr getJobParts(int jobId);
Database<Task>::recordListPtr getJobTasks(int jobId);
void sortJobsByDate(Database<Job>::recordList &jobs, bool ascending = true);
}
#endif // JOBCONTROLLER_H