AlbumSelectTreeView::AlbumSelectTreeView(AlbumModel* const model, AlbumModificationHelper* const albumModificationHelper, QWidget* const parent) : AlbumTreeView(parent), d(new Private) { setAlbumModel(model); d->albumModificationHelper = albumModificationHelper; d->newAlbumAction = new QAction(QIcon::fromTheme(QLatin1String("folder-new")), i18n("Create New Album"), this); }
AlbumTreeView::AlbumTreeView(QWidget* const parent, Flags flags) : AbstractCheckableAlbumTreeView(parent, flags) { setDragEnabled(true); setAcceptDrops(true); setAutoScroll(false); // Workaround for bug 400960 setRootIsDecorated(false); setDropIndicatorShown(false); setAutoExpandDelay(AUTOEXPANDDELAY); if (flags & CreateDefaultModel) { setAlbumModel(new AlbumModel(AlbumModel::IncludeRootAlbum, this)); } }
AlbumSelectionTreeView::AlbumSelectionTreeView(QWidget* const parent, AlbumModel* const model, AlbumModificationHelper* const albumModificationHelper) : AlbumTreeView(parent), d(new Private) { setAlbumModel(model); d->albumModificationHelper = albumModificationHelper; d->toolTip = new AlbumViewToolTip(this); d->findDuplAction = new QAction(QIcon::fromTheme(QLatin1String("tools-wizard")), i18n("Find Duplicates..."), this); d->rebuildThumbsAction = new QAction(QIcon::fromTheme(QLatin1String("view-refresh")), i18n("Refresh"), this); connect(d->findDuplAction, SIGNAL(triggered()), this, SLOT(slotFindDuplicates())); connect(d->rebuildThumbsAction, SIGNAL(triggered()), this, SLOT(slotRebuildThumbs())); setSortingEnabled(true); setSelectAlbumOnClick(true); setEnableContextMenu(true); setContextMenuTitle(i18n("Albums")); d->contextMenuElement = new Private::AlbumSelectionTreeViewContextMenuElement(d); addContextMenuElement(d->contextMenuElement); }