blob: 2b7c88433ca06c017b78a0918953452e186cfd08 (
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
/***************************************************************************
* Copyright (C) 2003 by *
* Unai Garro ([email protected]) *
* Cyril Bosselut ([email protected]) *
* Jason Kivlighn ([email protected]) *
* *
* 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 RECIPEVIEWDIALOG_H
#define RECIPEVIEWDIALOG_H
#include <tqvbox.h>
#include <tqstring.h>
class RecipeDB;
class Recipe;
class TDEHTMLPart;
class TQPushButton;
/**
@author Unai Garro
*/
class RecipeViewDialog : public TQVBox
{
TQ_OBJECT
public:
RecipeViewDialog( TQWidget *parent, RecipeDB *db, int recipeID = -1 );
~RecipeViewDialog();
/** @return Boolean indicating whether or not the recipe was successfully loaded */
bool loadRecipe( int recipeID );
/** @return Boolean indicating whether or not the recipes were successfully loaded */
bool loadRecipes( const TQValueList<int> &ids, const TQString &layoutConfig = TQString::null );
int recipesLoaded() const
{
return ids_loaded.count();
}
const TQValueList<int> currentRecipes() const
{
return ids_loaded;
}
void reload( const TQString &layoutConfig = TQString::null );
public slots:
void printNoPreview( void );
void print( void );
private:
// Internal Variables
TDEHTMLPart *recipeView;
RecipeDB *database;
bool recipe_loaded;
TQValueList<int> ids_loaded;
TQString tmp_filename;
// Internal Methods
bool showRecipes( const TQValueList<int> &ids, const TQString &layoutConfig );
void removeOldFiles();
private slots:
void recipeRemoved(int);
};
#endif
|