~ubuntu-branches/ubuntu/precise/gwenview/precise-proposed

« back to all changes in this revision

Viewing changes to lib/thumbnailgroup.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:54 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20111215141754-z043hyx69dulbggf
Tags: upstream-4.7.90
Import upstream version 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
 
1
// vim: set tabstop=4 shiftwidth=4 expandtab:
2
2
/*
3
3
Gwenview: an image viewer
4
4
Copyright 2008 Aurélien Gâteau <agateau@kde.org>
27
27
 
28
28
// Local
29
29
 
30
 
namespace Gwenview {
31
 
 
32
 
namespace ThumbnailGroup {
33
 
        enum Enum {
34
 
                Normal,
35
 
                Large
36
 
        };
37
 
 
38
 
        inline int pixelSize(Enum value) {
39
 
                if (value == Normal) {
40
 
                        return 128;
41
 
                } else {
42
 
                        return 256;
43
 
                }
44
 
        }
45
 
 
46
 
        inline Enum fromPixelSize(int value) {
47
 
                if (value <= 128) {
48
 
                        return Normal;
49
 
                } else {
50
 
                        return Large;
51
 
                }
52
 
        }
 
30
namespace Gwenview
 
31
{
 
32
 
 
33
namespace ThumbnailGroup
 
34
{
 
35
enum Enum {
 
36
    Normal,
 
37
    Large
 
38
};
 
39
 
 
40
inline int pixelSize(Enum value)
 
41
{
 
42
    if (value == Normal) {
 
43
        return 128;
 
44
    } else {
 
45
        return 256;
 
46
    }
 
47
}
 
48
 
 
49
inline Enum fromPixelSize(int value)
 
50
{
 
51
    if (value <= 128) {
 
52
        return Normal;
 
53
    } else {
 
54
        return Large;
 
55
    }
 
56
}
53
57
} // namespace ThumbnailGroup
54
58
 
55
59
} // namespace Gwenview