diff options
author | Michele Calgaro <[email protected]> | 2024-11-22 18:41:30 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-11-22 18:41:30 +0900 |
commit | ee0d99607c14cb63d3ebdb3a970b508949fa8219 (patch) | |
tree | 94ac1efedb94cb38bf6879ba0610fe75b554216b /src/utilities/lighttable/lighttablebar.h | |
parent | 4adff739380e4ae9f30e443ee95644f184456869 (diff) | |
download | digikam-ee0d99607c14cb63d3ebdb3a970b508949fa8219.tar.gz digikam-ee0d99607c14cb63d3ebdb3a970b508949fa8219.zip |
Rename 'digikam' folder to 'src'
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/utilities/lighttable/lighttablebar.h')
-rw-r--r-- | src/utilities/lighttable/lighttablebar.h | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/src/utilities/lighttable/lighttablebar.h b/src/utilities/lighttable/lighttablebar.h new file mode 100644 index 00000000..b64e93a6 --- /dev/null +++ b/src/utilities/lighttable/lighttablebar.h @@ -0,0 +1,153 @@ +/* ============================================================ + * + * This file is a part of digiKam project + * http://www.digikam.org + * + * Date : 2007-04-11 + * Description : light table thumbs bar + * + * Copyright (C) 2007-2008 by Gilles Caulier <caulier dot gilles at gmail dot com> + * + * 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. + * + * ============================================================ */ + +#ifndef LIGHTTABLEBAR_H +#define LIGHTTABLEBAR_H + +// Local includes. + +#include "thumbbar.h" +#include "imageinfo.h" +#include "digikam_export.h" + +class TQDragMoveEvent; +class TQDropEvent; +class TQMouseEvent; +class TQPaintEvent; + +class KURL; + +namespace Digikam +{ + +class LightTableBarItem; +class LightTableBarItemPriv; +class LightTableBarPriv; + +class DIGIKAM_EXPORT LightTableBar : public ThumbBarView +{ + TQ_OBJECT + + +public: + + LightTableBar(TQWidget* parent, int orientation=Vertical, bool exifRotate=true); + ~LightTableBar(); + + ImageInfo* currentItemImageInfo() const; + ImageInfoList itemsImageInfoList(); + + void setSelectedItem(LightTableBarItem* ltItem); + + LightTableBarItem* findItemByInfo(const ImageInfo* info) const; + LightTableBarItem* findItemByPos(const TQPoint& pos) const; + + /** Read tool tip settings from Album Settings instance */ + void readToolTipSettings(); + + void setOnLeftPanel(const ImageInfo* info); + void setOnRightPanel(const ImageInfo* info); + + void removeItem(const ImageInfo* info); + + void setNavigateByPair(bool b); + +signals: + + void signalLightTableBarItemSelected(ImageInfo*); + void signalSetItemOnLeftPanel(ImageInfo*); + void signalSetItemOnRightPanel(ImageInfo*); + void signalEditItem(ImageInfo*); + void signalRemoveItem(ImageInfo*); + void signalClearAll(); + void signalDroppedItems(const ImageInfoList&); + +private: + + void viewportPaintEvent(TQPaintEvent*); + void contentsMouseReleaseEvent(TQMouseEvent*); + void startDrag(); + void contentsDragMoveEvent(TQDragMoveEvent*); + void contentsDropEvent(TQDropEvent*); + +private slots: + + void slotImageRatingChanged(TQ_LLONG); + void slotItemSelected(ThumbBarItem*); + + void slotAssignRatingNoStar(); + void slotAssignRatingOneStar(); + void slotAssignRatingTwoStar(); + void slotAssignRatingThreeStar(); + void slotAssignRatingFourStar(); + void slotAssignRatingFiveStar(); + void slotAssignRating(int); + + void slotThemeChanged(); + +private: + + LightTableBarPriv *d; + + friend class LightTableBarItem; +}; + +// ------------------------------------------------------------------------- + +class DIGIKAM_EXPORT LightTableBarItem : public ThumbBarItem +{ +public: + + LightTableBarItem(LightTableBar *view, ImageInfo *info); + ~LightTableBarItem(); + + ImageInfo* info() const; + + void setOnLeftPanel(bool on); + void setOnRightPanel(bool on); + bool isOnLeftPanel() const; + bool isOnRightPanel() const; + +private: + + LightTableBarItemPriv *d; + + friend class LightTableBar; +}; + +// ------------------------------------------------------------------------- + +class DIGIKAM_EXPORT LightTableBarToolTip : public ThumbBarToolTip +{ +public: + + LightTableBarToolTip(ThumbBarView *parent); + +private: + + TQString tipContentExtraData(ThumbBarItem *item); +}; + +} // NameSpace Digikam + +#endif /* LIGHTTABLEBAR_H */ |