summaryrefslogtreecommitdiffstats
path: root/krecipes/src/backends/searchparameters.h
blob: 06fd9726c6c59a147395ede1365eb6570c1c68c9 (plain)
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
/***************************************************************************
*   Copyright (C) 2005                                                    *
*   Jason Kivlighn (jkivlighn@gmail.com)                                  *
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
***************************************************************************/

#ifndef SEARCHPARAMETERS_H
#define SEARCHPARAMETERS_H

#include <ntqstring.h>
#include <ntqstringlist.h>
#include <ntqdatetime.h>

class RecipeSearchParameters
{
public:
	RecipeSearchParameters() : servings(-1)/*, averageRating(-1), averageRatingOffset(0)*/
	{}

	TQStringList titleKeywords;
	bool requireAllTitleWords;

	TQStringList instructionsKeywords;
	bool requireAllInstructionsWords;

	TQStringList ingsOr;
	TQStringList catsOr;
	TQStringList authorsOr;

	TQTime prep_time;

	/** 0 -> greater than given time
	  * 1 -> less than given time
	  * 2 -> about given time
	  */
	int prep_param;

	int servings;

	/** 0 -> greater than given time
	  * 1 -> less than given time
	  * 2 -> about given time
	  */
	int servings_param;

	TQDateTime createdDateBegin;
	TQDateTime createdDateEnd;
	TQDateTime modifiedDateBegin;
	TQDateTime modifiedDateEnd;
	TQDateTime accessedDateBegin;
	TQDateTime accessedDateEnd;

	//RatingCriteriaList criteriaList;
	//double averageRating;
	//double averageRatingOffset;
};


#endif