Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded

ImportInterface Class Reference

The ImportInterface class provides a data import interface for Qtopia. More...

#include <interfaces/importexport.h>

List of all member functions.

Public Members


Detailed Description

The ImportInterface class provides a data import interface for Qtopia.

When Qtopia Desktop starts up it automatically scans for plugins and registers any plugins that support the ImportInterface. Qtopia Desktop is able to import data in formats supported by the ImportInterfaces it finds into the Qtopia device.

Writing an input interface plugin is achieved by subclassing this base class, reimplementing the pure virtual functions data(), externalApplicationName(), palmtopApplicationName(), dataSets() and importSettings() and exporting the class with the Q_EXPORT_PLUGIN macro. See the Plugins documentation for details.

See also Qtopia Desktop Classes.


Member Function Documentation

bool ImportInterface::data ( CenterInterface * center, const QString & dataSet, QValueList<MergeML::Record> & result ) [pure virtual]

This function is called by Qtopia Desktop. It is passed an interface to Qtopia Desktop, center, and the name of the format of the data to be imported in dataSet. The result value list should be populated with records that are in dataSet format. Qtopia Desktop is expected to import the result.

Returns TRUE if the data is successfully imported; otherwise returns FALSE.

QStringList ImportInterface::dataSets () const [pure virtual]

Returns a list of the formats that this import interface can handle.

Qtopia Desktop can import data in the "addressbook", "datebook", "todolist" and "categories" formats.

QString ImportInterface::externalApplicationName () const [pure virtual]

Returns the name of the application that generated the data. The name may be displayed to the user.

SettingsWidget * ImportInterface::importSettings ( QWidget * parent ) [pure virtual]

Returns a widget that the user can use to set any options that can affect the import process. The returned widget will appear in the import/export tab of the Qtopia Desktop settings dialog, which is also its parent widget.

May return 0 if there are no user-settable options.

QString ImportInterface::palmtopApplicationName () const [pure virtual]

Returns the name of the Qtopia application that the data should be imported into. For example, todo data would be directed at Qtopia's todo application.


This file is part of the Qtopia platform, copyright © 1995-2005 Trolltech, all rights reserved.


Copyright © 2005 Trolltech Trademarks
Qtopia version 2.1.2