digiKam
lighttableview.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2007-03-05
7  * Description : a widget to display 2 preview image on
8  * lightable to compare pictures.
9  *
10  * Copyright (C) 2007-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_LIGHT_TABLE_VIEW_H
26 #define DIGIKAM_LIGHT_TABLE_VIEW_H
27 
28 // Qt includes
29 
30 #include <QFrame>
31 #include <QString>
32 
33 // Local includes
34 
35 #include "iteminfo.h"
36 
37 namespace Digikam
38 {
39 
40 class PreviewSettings;
41 
42 class LightTableView : public QFrame
43 {
44  Q_OBJECT
45 
46 public:
47 
48  explicit LightTableView(QWidget* const parent = nullptr);
49  ~LightTableView() override;
50 
51  void setSyncPreview(bool sync);
52  void setNavigateByPair(bool b);
53 
54  void setLeftItemInfo(const ItemInfo& info = ItemInfo());
55  void setRightItemInfo(const ItemInfo& info = ItemInfo());
56 
57  ItemInfo leftItemInfo() const;
58  ItemInfo rightItemInfo() const;
59 
60  void setPreviewSettings(const PreviewSettings& settings);
61 
62  void checkForSelection(const ItemInfo& info);
63  void toggleFullScreen(bool set);
64 
65  double leftZoomMax() const;
66  double leftZoomMin() const;
67 
68  double rightZoomMax() const;
69  double rightZoomMin() const;
70 
71  bool leftMaxZoom() const;
72  bool leftMinZoom() const;
73 
74  bool rightMaxZoom() const;
75  bool rightMinZoom() const;
76 
77  void leftReload();
78  void rightReload();
79 
80 Q_SIGNALS:
81 
84 
87 
90 
93 
96 
99 
101  void signalEditItem(const ItemInfo&);
103 
104 public Q_SLOTS:
105 
106  void slotDecreaseLeftZoom();
107  void slotIncreaseLeftZoom();
108  void slotLeftZoomSliderChanged(int);
109  void setLeftZoomFactor(double z);
110  void slotLeftFitToWindow();
111  void slotLeftZoomTo100();
112 
113  void slotDecreaseRightZoom();
114  void slotIncreaseRightZoom();
115  void slotRightZoomSliderChanged(int);
116  void setRightZoomFactor(double z);
117  void slotRightFitToWindow();
118  void slotRightZoomTo100();
119 
120 private Q_SLOTS:
121 
122  void slotLeftContentsMoved(int, int);
123  void slotRightContentsMoved(int, int);
124  void slotLeftZoomFactorChanged(double);
125  void slotRightZoomFactorChanged(double);
126  void slotLeftPreviewLoaded(bool);
127  void slotRightPreviewLoaded(bool);
128  void slotDeleteLeftItem();
129  void slotDeleteRightItem();
130 
131 private :
132 
133  void checkForSyncPreview();
134 
136  bool leftPreviewLoading() const;
137 
139  bool rightPreviewLoading() const;
140 
141 private :
142 
143  class Private;
144  Private* const d;
145 };
146 
147 } // namespace Digikam
148 
149 #endif // DIGIKAM_LIGHT_TABLE_VIEW_H
Definition: iteminfolist.h:47
Definition: iteminfo.h:78
Definition: lighttableview.h:43
ItemInfo rightItemInfo() const
Definition: lighttableview.cpp:362
void leftReload()
Definition: lighttableview.cpp:293
void setLeftZoomFactor(double z)
Definition: lighttableview.cpp:207
void slotRightZoomSliderChanged(int)
Definition: lighttableview.cpp:285
void signalLeftDroppedItems(const ItemInfoList &)
void slotRightZoomTo100()
Definition: lighttableview.cpp:222
bool leftMaxZoom() const
Definition: lighttableview.cpp:247
bool rightMinZoom() const
Definition: lighttableview.cpp:272
void slotRightFitToWindow()
Definition: lighttableview.cpp:232
void signalLeftPreviewLoaded(bool)
void signalDeleteItem(const ItemInfo &)
void slotLeftZoomSliderChanged(int)
Definition: lighttableview.cpp:277
void slotLeftZoomTo100()
Definition: lighttableview.cpp:217
void setNavigateByPair(bool b)
Definition: lighttableview.cpp:181
void signalToggleOnSyncPreview(bool)
void signalRightDroppedItems(const ItemInfoList &)
double leftZoomMax() const
Definition: lighttableview.cpp:237
LightTableView(QWidget *const parent=nullptr)
Definition: lighttableview.cpp:72
void setLeftItemInfo(const ItemInfo &info=ItemInfo())
Definition: lighttableview.cpp:367
double rightZoomMax() const
Definition: lighttableview.cpp:257
void signalEditItem(const ItemInfo &)
ItemInfo leftItemInfo() const
Definition: lighttableview.cpp:357
double leftZoomMin() const
Definition: lighttableview.cpp:242
void slotIncreaseRightZoom()
Definition: lighttableview.cpp:202
void rightReload()
Definition: lighttableview.cpp:298
bool leftMinZoom() const
Definition: lighttableview.cpp:252
void slotLeftFitToWindow()
Definition: lighttableview.cpp:227
void slotDecreaseLeftZoom()
Definition: lighttableview.cpp:187
void setPreviewSettings(const PreviewSettings &settings)
Definition: lighttableview.cpp:161
void slotDecreaseRightZoom()
Definition: lighttableview.cpp:197
void signalRightZoomFactorChanged(double)
void signalLeftZoomFactorChanged(double)
void setRightItemInfo(const ItemInfo &info=ItemInfo())
Definition: lighttableview.cpp:377
void signalRightPanelLeftButtonClicked()
bool rightMaxZoom() const
Definition: lighttableview.cpp:267
void signalRightPreviewLoaded(bool)
~LightTableView() override
Definition: lighttableview.cpp:156
void signalLeftPanelLeftButtonClicked()
double rightZoomMin() const
Definition: lighttableview.cpp:262
void setSyncPreview(bool sync)
Definition: lighttableview.cpp:167
void toggleFullScreen(bool set)
Definition: lighttableview.cpp:468
void slotIncreaseLeftZoom()
Definition: lighttableview.cpp:192
void setRightZoomFactor(double z)
Definition: lighttableview.cpp:212
void checkForSelection(const ItemInfo &info)
Definition: lighttableview.cpp:419
Definition: previewsettings.h:35
Definition: datefolderview.cpp:43