~ubuntu-branches/ubuntu/feisty/photoprint/feisty

« back to all changes in this revision

Viewing changes to layoutdb.h

  • Committer: Bazaar Package Importer
  • Author(s): Milan Zamazal
  • Date: 2006-09-29 12:18:16 UTC
  • Revision ID: james.westby@ubuntu.com-20060929121816-6t2iz9zaymixd3om
Tags: upstream-0.3.3
ImportĀ upstreamĀ versionĀ 0.3.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef LAYOUT_DB_H
 
2
#define LAYOUT_DB_H
 
3
 
 
4
#include <iostream>
 
5
 
 
6
#include "support/configdb.h"
 
7
 
 
8
using namespace std;
 
9
 
 
10
class Layout_NUpDB : public ConfigDB
 
11
{
 
12
        public:
 
13
        Layout_NUpDB(ConfigFile *inif,char *section) : ConfigDB(Template)
 
14
        {
 
15
                new ConfigDBHandler(inif,section,this);
 
16
        }
 
17
        private:
 
18
        static ConfigTemplate Template[];
 
19
};
 
20
 
 
21
 
 
22
class Layout_SingleDB : public ConfigDB
 
23
{
 
24
        public:
 
25
        Layout_SingleDB(ConfigFile *inif,char *section) : ConfigDB(Template)
 
26
        {
 
27
                new ConfigDBHandler(inif,section,this);
 
28
        }
 
29
        private:
 
30
        static ConfigTemplate Template[];
 
31
};
 
32
 
 
33
 
 
34
class Layout_PosterDB : public ConfigDB
 
35
{
 
36
        public:
 
37
        Layout_PosterDB(ConfigFile *inif,char *section) : ConfigDB(Template)
 
38
        {
 
39
                new ConfigDBHandler(inif,section,this);
 
40
        }
 
41
        private:
 
42
        static ConfigTemplate Template[];
 
43
};
 
44
 
 
45
 
 
46
class Layout_CarouselDB : public ConfigDB
 
47
{
 
48
        public:
 
49
        Layout_CarouselDB(ConfigFile *inif,char *section) : ConfigDB(Template)
 
50
        {
 
51
                new ConfigDBHandler(inif,section,this);
 
52
        }
 
53
        private:
 
54
        static ConfigTemplate Template[];
 
55
};
 
56
 
 
57
 
 
58
class LayoutDB : public ConfigDB
 
59
{
 
60
        public:
 
61
        LayoutDB(ConfigFile *inif,char *section) :
 
62
                ConfigDB(Template), nupdb(inif,"[Layout_NUp]"),
 
63
                singledb(inif,"[Layout_Single]"), posterdb(inif,"[Layout_Poster]"),
 
64
                carouseldb(inif,"[Layout_Carousel]")
 
65
        {
 
66
                cerr << "In LayoutDB constructor" << endl;
 
67
                new ConfigDBHandler(inif,section,this);
 
68
        }
 
69
        // Add DBs for each layout type here
 
70
        Layout_NUpDB nupdb;
 
71
        Layout_SingleDB singledb;
 
72
        Layout_PosterDB posterdb;
 
73
        Layout_CarouselDB carouseldb;
 
74
        protected:
 
75
        static ConfigTemplate Template[];
 
76
};
 
77
 
 
78
#endif