summaryrefslogtreecommitdiffstats
path: root/kbarcode/kbarcodesettings.h
blob: 4d1ea1235750a7061e34eef2b86aff08648aab23 (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
/***************************************************************************
                          kbarcodesettings.h  -  description
                             -------------------
    begin                : Sat Jan 10 2004
    copyright            : (C) 2004 by Dominik Seichter
    email                : domseichter@web.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 KBARCODESETTINGS_H
#define KBARCODESETTINGS_H

#include <tqobject.h>

/**
    A singleton which is responsible for loading and saving KBarcodes settings.
    It emits also signals when some properties change.

    @author Dominik Seichter
*/
class KBarcodeSettings : public TQObject
{
    Q_OBJECT
  
    public:
        static KBarcodeSettings* getInstance();

        static const TQString getDateFormat() {
            return dateFormat;
        }

        int gridSize() const { return gridsize; }
        const TQColor & gridColor() const { return gridcolor; }
        bool newDialog() const { return newdlg; }
    public slots:
        void loadConfig();
        void saveConfig();
        void configure();

    signals:
        /** Emitted when the user changes the grid size
          */
        void updateGrid( int );

    private:
        KBarcodeSettings();
        ~KBarcodeSettings();

        static KBarcodeSettings* m_instance;

        // LabelEditor settings:
        static int gridsize;
        static bool newdlg;
        static TQColor gridcolor;
        static TQString dateFormat;
};

#endif