ContactListView::ContactListView(KAddressBookTableView *view, KABC::AddressBook* /* doc */, QWidget *parent, const char *name ) : K3ListView( parent ), pabWidget( view ), oldColumn( 0 ) { setObjectName(name); mABackground = true; mSingleLine = false; mToolTips = true; mShowIM = true; mAlternateColor = KColorScheme( QPalette::Active, KColorScheme::View ).background( KColorScheme::AlternateBackground ).color(); setAlternateBackgroundEnabled(mABackground); setAcceptDrops( true ); viewport()->setAcceptDrops( true ); setAllColumnsShowFocus( true ); setShowSortIndicator(true); setSelectionModeExt( K3ListView::Extended ); setDropVisualizer(false); connect(this, SIGNAL(dropped(QDropEvent*)), this, SLOT(itemDropped(QDropEvent*))); }
K3bDataFileView::K3bDataFileView( K3bView* view, K3bDataDirTreeView* dirTreeView, K3bDataDoc* doc, QWidget* parent ) : K3bListView( parent ), m_view(view), m_dropDirItem(0) { m_treeView = dirTreeView; setAcceptDrops( true ); setDropVisualizer( false ); setDropHighlighter( true ); setDragEnabled( true ); setItemsMovable( false ); setAllColumnsShowFocus( true ); setShowSortIndicator( true ); setNoItemText( i18n("Use drag'n'drop to add files and directories to the project.\n" "To remove or rename files use the context menu.\n" "After that press the burn button to write the CD.") ); addColumn( i18n("Name") ); addColumn( i18n("Type") ); addColumn( i18n("Size") ); addColumn( i18n("Local Path") ); addColumn( i18n("Link") ); setSelectionModeExt( KListView::Extended ); m_doc = doc; m_currentDir = doc->root(); checkForNewItems(); connect( m_treeView, SIGNAL(dirSelected(K3bDirItem*)), this, SLOT(slotSetCurrentDir(K3bDirItem*)) ); connect( m_doc, SIGNAL(itemRemoved(K3bDataItem*)), this, SLOT(slotDataItemRemoved(K3bDataItem*)) ); connect( m_doc, SIGNAL(itemAdded(K3bDataItem*)), this, SLOT(slotItemAdded(K3bDataItem*)) ); connect( this, SIGNAL(executed(QListViewItem*)), this, SLOT(slotExecuted(QListViewItem*)) ); connect( this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(showPopupMenu(KListView*, QListViewItem*, const QPoint&)) ); connect( this, SIGNAL(dropped(QDropEvent*, QListViewItem*, QListViewItem*)), this, SLOT(slotDropped(QDropEvent*, QListViewItem*, QListViewItem*)) ); connect( this, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), this, SLOT(slotDoubleClicked(QListViewItem*)) ); setupActions(); }