1
/***************************************************************************
2
* Copyright (C) 2004 by Alexander Dymo *
3
* cloudtemple@mksat.net *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
20
#include "docconfiglistview.h"
24
#include "kdevdocumentationplugin.h"
26
DocConfigListView::DocConfigListView(QWidget *parent, const char *name)
27
:KListView(parent, name)
30
addColumn(i18n("TOC"));
31
addColumn(i18n("Index"));
32
addColumn(i18n("Search"));
33
addColumn(i18n("Title"));
34
// addColumn(i18n("URL"));
35
setColumnWidthMode(0, QListView::Maximum);
36
setColumnWidthMode(1, QListView::Maximum);
37
setColumnWidthMode(2, QListView::Maximum);
38
setColumnWidthMode(3, QListView::Maximum);
39
// setColumnWidthMode(4, QListView::Maximum);
40
setAllColumnsShowFocus(true);
41
setResizeMode( QListView::LastColumn );
43
connect(this, SIGNAL(clicked(QListViewItem*, const QPoint&, int)),
44
this, SLOT(clickedItem(QListViewItem*, const QPoint&, int )));
47
DocConfigListView::~DocConfigListView()
51
void DocConfigListView::clickedItem(QListViewItem *item, const QPoint &// pnt
56
ConfigurationItem *cfg = dynamic_cast<ConfigurationItem*>(item);
61
cfg->setContents(!cfg->contents());
65
if ((c == 1) && (cfg->indexPossible()))
66
cfg->setIndex(!cfg->index());
67
else if ((c == 2) && (cfg->fullTextSearchPossible()))
68
cfg->setFullTextSearch(!cfg->fullTextSearch());
72
#include "docconfiglistview.moc"