~paulbrianstewart/ubuntu/oneiric/tellico/852247-Formatting-Fix

« back to all changes in this revision

Viewing changes to src/translators/importer.h

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-31 19:33:05 UTC
  • mfrom: (0.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20080131193305-9l01m5gfhykl6pkl
Tags: 1.3-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: build-dep on kdepim-dev
  - debian/control: drop versioned python from tellico-data suggests
  - debian/rules: call dh_icons

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
   *
51
51
   * @param url The URL of the file to import
52
52
   */
53
 
  Importer(const KURL& url) : QObject(), m_options(ImportProgress), m_url(url) {}
 
53
  Importer(const KURL& url) : QObject(), m_options(ImportProgress), m_urls(url) {}
 
54
  Importer(const KURL::List& urls) : QObject(), m_options(ImportProgress), m_urls(urls) {}
54
55
  Importer(const QString& text) : QObject(), m_options(ImportProgress), m_text(text) {}
55
56
  /**
56
57
   */
85
86
   * @return Whether the importer could return a collection of that type
86
87
   */
87
88
  virtual bool canImport(int) const { return true; }
 
89
  /**
 
90
   * Validate the import settings
 
91
   */
 
92
  virtual bool validImport() const { return true; }
88
93
  virtual void setText(const QString& text) { m_text = text; }
89
94
  long options() const { return m_options; }
90
95
  void setOptions(long options) { m_options = options; }
107
112
   *
108
113
   * @return the file URL
109
114
   */
110
 
  const KURL& url() const { return m_url; }
111
 
  const QString& text() const { return m_text; }
 
115
  KURL url() const { return m_urls.isEmpty() ? KURL() : m_urls[0]; }
 
116
  KURL::List urls() const { return m_urls; }
 
117
  QString text() const { return m_text; }
112
118
  /**
113
119
   * Adds a message to the status queue.
114
120
   *
120
126
 
121
127
private:
122
128
  long m_options;
123
 
  KURL m_url;
 
129
  KURL::List m_urls;
124
130
  QString m_text;
125
131
  QString m_statusMsg;
126
132
};