┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/zoomlevelinfo.h
blob: 2d444eaf0a2a39465915e902c114cd9671495103 (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
/*
 * SPDX-FileCopyrightText: 2008 Peter Penz <[email protected]>
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef ZOOMLEVELINFO_H
#define ZOOMLEVELINFO_H

class QSize;

/**
 * @short Helper class for getting information about the zooming
 *        capabilities.
 */
class ZoomLevelInfo
{
public:
    static int minimumLevel();
    static int maximumLevel();

    /**
     * Helper method for the view implementation to get
     * the icon size for the zoom level \a level that
     * is between the range ZoomLevelInfo::minimumLevel() and
     * ZoomLevelInfo::maximumLevel().
     */
    static int iconSizeForZoomLevel(int level);

    /**
     * Helper method for the view implementation to get
     * the zoom level for the icon size \a size that
     * is between the range ZoomLevelInfo::minimumLevel() and
     * ZoomLevelInfo::maximumLevel().
     */
    static int zoomLevelForIconSize(const QSize &size);
};

#endif