• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kget

  • sources
  • kde-4.12
  • kdenetwork
  • kget
  • transfer-plugins
  • metalink
fileselectiondlg.cpp
Go to the documentation of this file.
1 /***************************************************************************
2 * Copyright (C) 2010 Matthias Fuchs <mat69@gmx.net> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
18 ***************************************************************************/
19 
20 #include "fileselectiondlg.h"
21 
22 #include "../../core/filemodel.h"
23 
24 #include <QtGui/QSortFilterProxyModel>
25 
26 #include <KInputDialog>
27 
28 FileSelectionDlg::FileSelectionDlg(FileModel *model, QWidget *parent)
29  : KDialog(parent)
30 {
31  setCaption(i18n("File Selection"));
32  QWidget *widget = new QWidget(this);
33  ui.setupUi(widget);
34  setMainWidget(widget);
35  QSortFilterProxyModel *proxy = new QSortFilterProxyModel(this);
36  proxy->setSourceModel(model);
37  ui.treeView->setModel(proxy);
38  ui.treeView->sortByColumn(0, Qt::AscendingOrder);
39  ui.treeView->hideColumn(FileItem::Status);
40  ui.treeView->hideColumn(FileItem::ChecksumVerified);
41  ui.treeView->hideColumn(FileItem::SignatureVerified);
42 
43  setButtons(KDialog::Ok | KDialog::Cancel);
44 }
FileSelectionDlg::FileSelectionDlg
FileSelectionDlg(FileModel *model, QWidget *parent=0)
Definition: fileselectiondlg.cpp:28
FileItem::parent
FileItem * parent()
Definition: filemodel.cpp:248
QWidget
KDialog
FileModel
This model represents the files that are being downloaded.
Definition: filemodel.h:101
fileselectiondlg.h
QSortFilterProxyModel
FileItem::ChecksumVerified
Definition: filemodel.h:48
FileItem::Status
Definition: filemodel.h:46
FileItem::SignatureVerified
Definition: filemodel.h:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal