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

kaddressbook

  • sources
  • kde-4.12
  • kdepim
  • kaddressbook
  • xxport
  • csv
csvimportdialog.h
Go to the documentation of this file.
1 /*
2  This file is part of KAddressBook.
3  Copyright (c) 2009 Tobias Koenig <tokoe@kde.org>
4 
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.
9 
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.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef CSVIMPORTDIALOG_H
21 #define CSVIMPORTDIALOG_H
22 
23 #include "contactfields.h"
24 
25 #include <KABC/Addressee>
26 
27 #include <KDialog>
28 
29 #include <QtCore/QList>
30 
31 class KComboBox;
32 class KLineEdit;
33 class KUrlRequester;
34 
35 class QButtonGroup;
36 class QCheckBox;
37 class QCsvModel;
38 class QTableView;
39 
40 class CSVImportDialog : public KDialog
41 {
42  Q_OBJECT
43 
44  public:
45  explicit CSVImportDialog( QWidget *parent = 0 );
46  ~CSVImportDialog();
47 
48  KABC::AddresseeList contacts() const;
49 
50  protected Q_SLOTS:
51  virtual void slotButtonClicked( int );
52 
53  private Q_SLOTS:
54  void setFile( const QString & );
55  void setFile( const KUrl & );
56  void urlChanged( const QString & );
57 
58  void customDelimiterChanged();
59  void customDelimiterChanged( const QString &, bool reload = true );
60  void delimiterClicked( int, bool reload = true );
61  void textQuoteChanged( const QString &, bool reload = true );
62  void skipFirstRowChanged( bool, bool reload = true );
63  void codecChanged( bool reload = true );
64 
65  void modelFinishedLoading();
66  void finalizeApplyTemplate();
67 
68  private:
69  void applyTemplate();
70  void saveTemplate();
71 
72  QTableView *mTable;
73  QButtonGroup *mDelimiterGroup;
74  KLineEdit *mDelimiterEdit;
75  KLineEdit *mDatePatternEdit;
76  KComboBox *mComboQuote;
77  KComboBox *mCodecCombo;
78  QCheckBox *mSkipFirstRow;
79  KUrlRequester *mUrlRequester;
80  QCsvModel *mModel;
81 
82  void initGUI();
83 
84  void reloadCodecs();
85  QTextCodec *currentCodec();
86  QList<QTextCodec*> mCodecs;
87 
88  QChar mTextQuote;
89  QString mDelimiter;
90  QMap<QString, uint> mTypeMap;
91  QIODevice *mDevice;
92  ContactFields::Fields mFieldSelection;
93 };
94 
95 #endif
CSVImportDialog::contacts
KABC::AddresseeList contacts() const
Definition: csvimportdialog.cpp:222
contactfields.h
CSVImportDialog::slotButtonClicked
virtual void slotButtonClicked(int)
Definition: csvimportdialog.cpp:564
KDialog
CSVImportDialog::~CSVImportDialog
~CSVImportDialog()
Definition: csvimportdialog.cpp:217
CSVImportDialog::CSVImportDialog
CSVImportDialog(QWidget *parent=0)
Definition: csvimportdialog.cpp:176
ContactFields::Fields
QVector< Field > Fields
Defines a list of Field enums.
Definition: contactfields.h:95
CSVImportDialog
Definition: csvimportdialog.h:40
QCsvModel
Definition: qcsvmodel.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kaddressbook

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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