]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/catalogue.h
5adbde0c8e367c3e64170793ab8caf29c70123aa
[r2c2.git] / source / libr2c2 / catalogue.h
1 #ifndef LIBR2C2_CATALOGUE_H_
2 #define LIBR2C2_CATALOGUE_H_
3
4 #include <map>
5 #include <msp/datafile/collection.h>
6 #include <msp/datafile/collectionsource.h>
7 #include <msp/fs/path.h>
8 #include "articlenumber.h"
9 #include "layout.h"
10 #include "trackappearance.h"
11
12 namespace R2C2 {
13
14 class ObjectType;
15
16 class Catalogue: public Msp::DataFile::Collection
17 {
18 public:
19         class Loader: public Msp::DataFile::Collection::Loader
20         {
21         private:
22                 Catalogue &cat;
23
24         public:
25                 Loader(Catalogue &);
26         private:
27                 void layout();
28                 void scale(float, float);
29         };
30
31         sigc::signal<void, Msp::DataFile::CollectionSource &> signal_source_added;
32
33 private:
34         float scale;
35         Layout layout;
36         std::list<Msp::DataFile::CollectionSource *> sources;
37
38 public:
39         Catalogue();
40
41         void add_source(const Msp::FS::Path &);
42         const std::list<Msp::DataFile::CollectionSource *> &get_sources() const { return sources; }
43
44         float get_scale() const { return scale; }
45         Layout &get_layout() { return layout; }
46 };
47
48 } // namespace R2C2
49
50 #endif