summaryrefslogtreecommitdiffstats
path: root/src/libs/themeengine/theme.cpp
blob: 8e4b5142d609488c90b4474caf4c049ac7d126ea (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/* ============================================================
 *
 * This file is a part of digiKam project
 * http://www.digikam.org
 *
 * Date        : 2004-08-02
 * Description : theme manager
 * 
 * Copyright (C) 2004 by Renchi Raju <[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, or (at your option)
 * any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * ============================================================ */

// Local includes.

#include "ddebug.h"
#include "theme.h"

namespace Digikam
{

Theme::Theme(const TQString& _name, const TQString& _path)
{
    name     = _name;
    filePath = _path;
}

Theme::Theme(const Theme& theme)
{
    if (this != &theme)
    {
        baseColor       =  theme.baseColor;      
        textRegColor    =  theme.textRegColor;   
        textSelColor    =  theme.textSelColor;
        textSpecialRegColor = theme.textSpecialRegColor;
        textSpecialSelColor = theme.textSpecialSelColor;

        bannerColor     =  theme.bannerColor;    
        bannerColorTo   =  theme.bannerColorTo;  
        bannerBevel     =  theme.bannerBevel;    
        bannerGrad      =  theme.bannerGrad;
        bannerBorder    =  theme.bannerBorder;
        bannerBorderColor =  theme.bannerBorderColor;

        thumbRegColor   =  theme.thumbRegColor;  
        thumbRegColorTo =  theme.thumbRegColorTo;
        thumbRegBevel   =  theme.thumbRegBevel;  
        thumbRegGrad    =  theme.thumbRegGrad;   
        thumbRegBorder  =  theme.thumbRegBorder;
        thumbRegBorderColor =  theme.thumbRegBorderColor;

        thumbSelColor   =  theme.thumbSelColor;  
        thumbSelColorTo =  theme.thumbSelColorTo;
        thumbSelBevel   =  theme.thumbSelBevel;  
        thumbSelGrad    =  theme.thumbSelGrad;   
        thumbSelBorder  =  theme.thumbSelBorder;
        thumbSelBorderColor =  theme.thumbSelBorderColor;

        listRegColor    =  theme.listRegColor;   
        listRegColorTo  =  theme.listRegColorTo; 
        listRegBevel    =  theme.listRegBevel;   
        listRegGrad     =  theme.listRegGrad;    
        listRegBorder   =  theme.listRegBorder;
        listRegBorderColor =  theme.listRegBorderColor;

        listSelColor    =  theme.listSelColor;   
        listSelColorTo  =  theme.listSelColorTo; 
        listSelBevel    =  theme.listSelBevel;   
        listSelGrad     =  theme.listSelGrad;    
        listSelBorder   =  theme.listSelBorder;
        listSelBorderColor =  theme.listSelBorderColor;
    }
}

Theme& Theme::operator=(const Theme& theme)
{
    if (this != &theme)
    {
        baseColor       =  theme.baseColor;      
        textRegColor    =  theme.textRegColor;   
        textSelColor    =  theme.textSelColor;   
        textSpecialRegColor = theme.textSpecialRegColor;
        textSpecialSelColor = theme.textSpecialSelColor;

        bannerColor     =  theme.bannerColor;    
        bannerColorTo   =  theme.bannerColorTo;  
        bannerBevel     =  theme.bannerBevel;    
        bannerGrad      =  theme.bannerGrad;
        bannerBorder    =  theme.bannerBorder;
        bannerBorderColor =  theme.bannerBorderColor;

        thumbRegColor   =  theme.thumbRegColor;  
        thumbRegColorTo =  theme.thumbRegColorTo;
        thumbRegBevel   =  theme.thumbRegBevel;  
        thumbRegGrad    =  theme.thumbRegGrad;   
        thumbRegBorder  =  theme.thumbRegBorder;
        thumbRegBorderColor =  theme.thumbRegBorderColor;

        thumbSelColor   =  theme.thumbSelColor;  
        thumbSelColorTo =  theme.thumbSelColorTo;
        thumbSelBevel   =  theme.thumbSelBevel;  
        thumbSelGrad    =  theme.thumbSelGrad;   
        thumbSelBorder  =  theme.thumbSelBorder;
        thumbSelBorderColor =  theme.thumbSelBorderColor;

        listRegColor    =  theme.listRegColor;   
        listRegColorTo  =  theme.listRegColorTo; 
        listRegBevel    =  theme.listRegBevel;   
        listRegGrad     =  theme.listRegGrad;    
        listRegBorder   =  theme.listRegBorder;
        listRegBorderColor =  theme.listRegBorderColor;

        listSelColor    =  theme.listSelColor;   
        listSelColorTo  =  theme.listSelColorTo; 
        listSelBevel    =  theme.listSelBevel;   
        listSelGrad     =  theme.listSelGrad;    
        listSelBorder   =  theme.listSelBorder;
        listSelBorderColor =  theme.listSelBorderColor;
    }
    return *this;
}

void Theme::print()
{
    /*
    DDebug() << "Theme :                      " << name << endl;
    
    DDebug() << "Base Color:                  " << baseColor << endl;
    DDebug() << "Text Regular  Color:         " << textRegColor << endl;
    DDebug() << "Text Selected Color:         " << textSelColor << endl;
    DDebug() << "Text Special Regular Color:  " << textSpecialRegColor << endl;
    DDebug() << "Text Special Selected Color: " << textSpecialSelColor << endl;

    DDebug() << "Banner Color:                " << bannerColor << endl;
    DDebug() << "Banner ColorTo :             " << bannerColorTo << endl;
    DDebug() << "Banner Bevel :               " << bannerBevel << endl;
    DDebug() << "Banner Gradient :            " << bannerGrad << endl;
    DDebug() << "Banner Border :              " << bannerBorder << endl;
    DDebug() << "Banner Border Color :        " << bannerBorderColor << endl;

    DDebug() << "ThumbReg Color:              " << thumbRegColor << endl;
    DDebug() << "ThumbReg ColorTo :           " << thumbRegColorTo << endl;
    DDebug() << "ThumbReg Bevel :             " << thumbRegBevel << endl;
    DDebug() << "ThumbReg Gradient :          " << thumbRegGrad << endl;
    DDebug() << "ThumbReg Border :            " << thumbRegBorder << endl;
    DDebug() << "ThumbReg Border Color :      " << thumbRegBorderColor << endl;

    DDebug() << "ThumbSel Color:              " << thumbSelColor << endl;
    DDebug() << "ThumbSel ColorTo :           " << thumbSelColorTo << endl;
    DDebug() << "ThumbSel Bevel :             " << thumbSelBevel << endl;
    DDebug() << "ThumbSel Gradient :          " << thumbSelGrad << endl;
    DDebug() << "ThumbSel Border :            " << thumbSelBorder << endl;
    DDebug() << "ThumbSel Border Color :      " << thumbSelBorderColor << endl;

    DDebug() << "ListReg Color:              " << listRegColor << endl;
    DDebug() << "ListReg ColorTo :           " << listRegColorTo << endl;
    DDebug() << "ListReg Bevel :             " << listRegBevel << endl;
    DDebug() << "ListReg Gradient :          " << listRegGrad << endl;
    DDebug() << "ListReg Border :            " << listRegBorder << endl;
    DDebug() << "ListReg Border Color :      " << listRegBorderColor << endl;

    DDebug() << "ListSel Color:              " << listSelColor << endl;
    DDebug() << "ListSel ColorTo :           " << listSelColorTo << endl;
    DDebug() << "ListSel Bevel :             " << listSelBevel << endl;
    DDebug() << "ListSel Gradient :          " << listSelGrad << endl;
    DDebug() << "ListSel Border :            " << listSelBorder << endl;
    DDebug() << "ListSel Border Color :      " << listSelBorderColor << endl;
    */
}

}  // NameSpace Digikam