ThumbnailView Namespace Reference

The classes in this namespace makes up the thumbnail window. More...


Classes

class  Cell
class  CellGeometry
class  GridResizeInteraction
class  KeyboardEventHandler
class  MouseInteraction
class  MouseTrackingInteraction
class  SelectionInteraction
class  ThumbnailBuilder
class  ThumbnailCache
class  ThumbnailComponent
class  ThumbnailDND
class  ThumbnailFacade
class  ThumbnailFactory
class  ThumbnailModel
class  ThumbnailPainter
class  ThumbnailRequest
class  ThumbnailCacheRequest
class  ThumbnailToolTip
class  ThumbnailWidget

Typedefs

typedef QSet< DB::ResultIdIdSet

Enumerations

enum  SortDirection { NewestFirst, OldestFirst }
enum  Order { ViewOrder, SortedOrder }
enum  CoordinateSystem { ViewportCoordinates, ContentsCoordinates }
enum  VisibleState { FullyVisible, PartlyVisible }


Detailed Description

The classes in this namespace makes up the thumbnail window.

Design Decisions

Base structure and API

The only class that should be seen from the outside is the class ThumbnailFacade. This class has delegates for the methods on the various object that the outside need to know. Please be careful not to expose anything, except though this class.

The thumbnail viewer was likely one of the very first pieces of code that was written in KPhotoAlbum, and consequently also one of the pieces of code that just grew larger and larger organically. During a large refactoring session in July 2009, this was cleaned up, but a number of objects are still very tightly connected, namely the widget itself (ThumbnailWidget), its painting code (ThumbnailPainter), its data model (ThumbnailModel), and its event handlers.

To avoid that all these classes needed to be set up with pointers to each other, a factory (ThumbnailFactory) was created, from which any of these object could get to the other. To avoid outside objects to misuse this factory to get to the objects, they were explicit constructed with the factory by the object who owned the pointers to all of the participants, namely ThumbnailFacade, and as the ThumbnailFactory only is an interface, it would not help the outside in.

To ease the jump between the involved objects, and to make it more explicit which objects participated, and what they accessed from each other, they all inherited from ThumbnailComponent which offers methods like ThumbnailComponent::model(), ThumbnailComponent::widget() etc.

The core part of this module consist of these classes:

Thumbnail Handling

Mouse Interaction

Keyboard Interaction

Tooltips


Typedef Documentation


Enumeration Type Documentation

Enumerator:
ViewportCoordinates 
ContentsCoordinates 

Enumerator:
ViewOrder 
SortedOrder 

Enumerator:
NewestFirst 
OldestFirst 

Enumerator:
FullyVisible 
PartlyVisible 


Generated on Sun Jul 19 11:01:17 2009 for KPhotoAlbum by  doxygen 1.5.8