CollectionSetup: added features required by KlamOnAcc.

* Ability to turn off "full mode" (that is, DeviceItems).
* Ability to provide a starter TQStringList of directories.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/24/head
Mavridis Philippe 4 years ago
parent 4d09225252
commit c9462edae6
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -41,11 +41,13 @@ using Collection::DeviceItem;
CollectionSetup* CollectionSetup::s_instance;
CollectionSetup::CollectionSetup( TQWidget *parent, bool recursive )
CollectionSetup::CollectionSetup( TQWidget *parent, bool recursive, bool fullMode, TQStringList dirs )
: TQVBox( parent )
{
s_instance = this;
m_dirs = dirs;
// (new TQLabel( i18n(
// "Select the folder(s) to scan. "), this ))->setAlignment( TQt::WordBreak );
@ -70,7 +72,7 @@ CollectionSetup::CollectionSetup( TQWidget *parent, bool recursive )
reinterpret_cast<TQWidget*>(m_view->header())->hide();
new Item( m_view, i18n( "System Folder" ), "/", "folder_red" );
new Item( m_view, i18n( "Home Folder" ), TQDir::homeDirPath(), "folder_home" );
new DeviceItem( m_view );
if( fullMode ) new DeviceItem( m_view );
setSpacing( 6 );
}

@ -39,7 +39,7 @@ Q_OBJECT
public:
static CollectionSetup* instance() { return s_instance; }
CollectionSetup( TQWidget* ,bool );
CollectionSetup( TQWidget *parent, bool recursive, bool fullMode = true, TQStringList dirs = TQStringList() );
TQStringList dirs() const { return m_dirs; }
bool recursive() const { return m_recursive; }

Loading…
Cancel
Save