17 #include <qapplication.h> 18 #include <qtoolbutton.h> 21 #include <Q3GridLayout> 32 #include "../config.h" 33 #include "../backend/album.h" 34 #include "../backend/subalbum.h" 35 #include "../backend/tools/guiTools.h" 36 #include "../configuration/configuration.h" 48 collectionsHeader->setText( tr(
"Collections:") );
49 QFont labelFont = collectionsHeader->font();
50 labelFont.setWeight(QFont::Bold);
51 collectionsHeader->setFont( labelFont );
57 collections->setSelectionMode( Q3IconView::Single ) ;
69 collections->setPaletteBackgroundColor( QColor(193, 210, 238) );
72 collections->setVScrollBarMode( Q3ScrollView::Auto );
73 collections->setHScrollBarMode( Q3ScrollView::Auto );
86 QFont buttonFont( qApp->font() );
87 buttonFont.setBold(
true);
88 buttonFont.setPointSize( 11 );
97 createButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
98 QToolTip::add(
createButton, tr(
"Create a collection and append to subalbum list") );
108 deleteButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
109 QToolTip::add(
deleteButton, tr(
"Delete selected collection and all its contents") );
113 Q3GridLayout* grid =
new Q3GridLayout(
this, 3, 2, 0 );
114 grid->addMultiCellWidget( collectionsHeader, 0, 0, 0, 1, Qt::AlignHCenter );
115 grid->addMultiCellWidget(
collections, 1, 1, 0, 1 );
120 grid->setRowStretch( 1, 1 );
123 setPaletteBackgroundColor( QColor(193, 210, 238) );
135 newCollectionIcon->setDropEnabled(
true);
149 bool proceed = !((
Window*)qApp->mainWidget())->getConfig()->getBool(
"alerts",
"showDestructiveAlerts" );
153 tr(
"Once deleted a collection and it's contents cannot be brought back unless a saved copy of the album exists."),
154 "alertIcons/warning.png",
156 proceed = sure.exec();
167 if(newSelection == NULL) newSelection = oldSelection->prevItem();
185 if(newSelection != NULL)
collections->ensureItemVisible( newSelection );
246 while(current != NULL)
262 while( curCollection != NULL)
265 item->setDropEnabled(
true);
266 curCollection = curCollection->
getNext();
294 if( item != NULL )
collections->setSelected( item,
true);
int getNumSubalbums()
Returns number of subalbums.
Extension of iconview, used to list all subalbums in album. Supports drag-n-drop within iconview such...
void appendSubalbum(Subalbum *val)
Appends subalbum to end of linked list.
Top level widget, encapsulates the title widget, the layout widget, and the toolbar widget...
void syncSubalbumList(SubalbumPreviewWidget *item)
Syncs subalbum ordering with front end gui ordering.
A subalbum contains photos.
void removeSubalbum(Subalbum *val)
Removes a subalbum.
Subalbum * getFirstSubalbum()
Returns a pointer to the first Subalbum.
An album contains Subalbums.
Subalbum * getNext()
Returns pointer to next subalbum.
A configurable question dialog that returns true/false.
TitleWidget * getTitle()
returns a pointer to the title widget