diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 00:38:54 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 00:38:54 -0600 |
commit | da1522385e5367bae56b90fac55c4355e475905b (patch) | |
tree | bfa432864dbf322feb4ed3a878f1222ee8ea7727 /doc/kdearch/index.docbook | |
parent | b9e542d0c805e9adee3a67e44532d5321032e21e (diff) | |
download | tdevelop-da1522385e5367bae56b90fac55c4355e475905b.tar.gz tdevelop-da1522385e5367bae56b90fac55c4355e475905b.zip |
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'doc/kdearch/index.docbook')
-rw-r--r-- | doc/kdearch/index.docbook | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/doc/kdearch/index.docbook b/doc/kdearch/index.docbook index a3579f9d..e5942974 100644 --- a/doc/kdearch/index.docbook +++ b/doc/kdearch/index.docbook @@ -143,7 +143,7 @@ database, global settings and application resources. <itemizedlist> -<listitem><formalpara><title><ulink url="kdeapi:tdecore/KConfig">KConfig</ulink></title> +<listitem><formalpara><title><ulink url="kdeapi:tdecore/TDEConfig">TDEConfig</ulink></title> <para> Provides access to KDE's configuration database. </para> @@ -2385,7 +2385,7 @@ contents of a local file. For remote files, there is a further possibility: <programlisting> KURL url("http://developer.kde.org/favicon.ico"); -QString type = KIO::NetAccess::mimetype(url); +QString type = TDEIO::NetAccess::mimetype(url); if (type == KMimeType::defaultMimeType()) cout << "Could not find out type" << endl; else @@ -2408,17 +2408,17 @@ explicitly start the KIO job and connect to some of its signals: void FooClass::findType() { KURL url("http://developer.kde.org/favicon.ico"); - KIO::MimetypeJob *job = KIO::mimetype(url); - connect( job, SIGNAL(result(KIO::Job*)), - this, SLOT(mimeResult(KIO::Job*)) ); + TDEIO::MimetypeJob *job = TDEIO::mimetype(url); + connect( job, SIGNAL(result(TDEIO::Job*)), + this, SLOT(mimeResult(TDEIO::Job*)) ); } -void FooClass::mimeResult(KIO::Job *job) +void FooClass::mimeResult(TDEIO::Job *job) { if (job->error()) job->showErrorDialog(); else - cout << "MIME type: " << ((KIO::MimetypeJob *)job)->mimetype() << endl; + cout << "MIME type: " << ((TDEIO::MimetypeJob *)job)->mimetype() << endl; } </programlisting> @@ -2595,19 +2595,19 @@ http://www-com.physik.hu-berlin.de/~bernd/article.tgz#tar:/paper.tex In most cases, jobs are created by calling functions in the KIO namespace. These functions take one or two URLs as arguments, and possible other necessary parameters. When the job is finished, it emits the signal -<literal>result(KIO::Job*)</literal>. After this signal has been emitted, the job +<literal>result(TDEIO::Job*)</literal>. After this signal has been emitted, the job deletes itself. Thus, a typical use case will look like this: </para> <programlisting> void FooClass::makeDirectory() { - SimpleJob *job = KIO::mkdir(KURL("file:/home/bernd/kiodir")); - connect( job, SIGNAL(result(KIO::Job*)), - this, SLOT(mkdirResult(KIO::Job*)) ); + SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/kiodir")); + connect( job, SIGNAL(result(TDEIO::Job*)), + this, SLOT(mkdirResult(TDEIO::Job*)) ); } -void FooClass::mkdirResult(KIO::Job *job) +void FooClass::mkdirResult(TDEIO::Job *job) { if (job->error()) job->showErrorDialog(); @@ -2627,118 +2627,118 @@ Here is an overview over the possible functions: <variablelist> -<varlistentry><term>KIO::mkdir(const KURL &url, int permission)</term> +<varlistentry><term>TDEIO::mkdir(const KURL &url, int permission)</term> <listitem><para> Creates a directory, optionally with certain permissions. </para></listitem> </varlistentry> -<varlistentry><term>KIO::rmdir(const KURL &url)</term> +<varlistentry><term>TDEIO::rmdir(const KURL &url)</term> <listitem><para> Removes a directory. </para></listitem> </varlistentry> -<varlistentry><term>KIO::chmod(const KURL &url, int permissions)</term> +<varlistentry><term>TDEIO::chmod(const KURL &url, int permissions)</term> <listitem><para> Changes the permissions of a file. </para></listitem> </varlistentry> -<varlistentry><term>KIO::rename(const KURL &src, const KURL &dest, +<varlistentry><term>TDEIO::rename(const KURL &src, const KURL &dest, bool overwrite)</term> <listitem><para> Renames a file. </para></listitem> </varlistentry> -<varlistentry><term>KIO::symlink(const QString &target, const KURL &dest, +<varlistentry><term>TDEIO::symlink(const QString &target, const KURL &dest, bool overwrite, bool showProgressInfo)</term> <listitem><para> Creates a symbolic link. </para></listitem> </varlistentry> -<varlistentry><term>KIO::stat(const KURL &url, bool showProgressInfo)</term> +<varlistentry><term>TDEIO::stat(const KURL &url, bool showProgressInfo)</term> <listitem><para> Finds out certain information about the file, such as size, modification time and permissions. The information can be obtained from -KIO::StatJob::statResult() after the job has finished. +TDEIO::StatJob::statResult() after the job has finished. </para></listitem> </varlistentry> -<varlistentry><term>KIO::get(const KURL &url, bool reload, bool showProgressInfo)</term> +<varlistentry><term>TDEIO::get(const KURL &url, bool reload, bool showProgressInfo)</term> <listitem><para> Transfers data from a URL. </para></listitem> </varlistentry> -<varlistentry><term>KIO::put(const KURL &url, int permissions, bool overwrite, +<varlistentry><term>TDEIO::put(const KURL &url, int permissions, bool overwrite, bool resume, bool showProgressInfo)</term> <listitem><para> Transfers data to a URL. </para></listitem> </varlistentry> -<varlistentry><term>KIO::http_post(const KURL &url, const QByteArray &data, +<varlistentry><term>TDEIO::http_post(const KURL &url, const QByteArray &data, bool showProgressInfo)</term> <listitem><para>Posts data. Special for HTTP. </para></listitem> </varlistentry> -<varlistentry><term>KIO::mimetype(const KURL &url, bool showProgressInfo)</term> +<varlistentry><term>TDEIO::mimetype(const KURL &url, bool showProgressInfo)</term> <listitem><para> Tries to find the MIME type of the URL. The type can be obtained from -KIO::MimetypeJob::mimetype() after the job has finished. +TDEIO::MimetypeJob::mimetype() after the job has finished. </para></listitem> </varlistentry> -<varlistentry><term>KIO::file_copy(const KURL &src, const KURL &dest, int permissions, +<varlistentry><term>TDEIO::file_copy(const KURL &src, const KURL &dest, int permissions, bool overwrite, bool resume, bool showProgressInfo)</term> <listitem><para> Copies a single file. </para></listitem> </varlistentry> -<varlistentry><term>KIO::file_move(const KURL &src, const KURL &dest, int permissions, +<varlistentry><term>TDEIO::file_move(const KURL &src, const KURL &dest, int permissions, bool overwrite, bool resume, bool showProgressInfo)</term> <listitem><para> Renames or moves a single file. </para></listitem> </varlistentry> -<varlistentry><term>KIO::file_delete(const KURL &url, bool showProgressInfo)</term> +<varlistentry><term>TDEIO::file_delete(const KURL &url, bool showProgressInfo)</term> <listitem><para> Deletes a single file. </para></listitem> </varlistentry> -<varlistentry><term>KIO::listDir(const KURL &url, bool showProgressInfo)</term> +<varlistentry><term>TDEIO::listDir(const KURL &url, bool showProgressInfo)</term> <listitem><para> Lists the contents of a directory. Each time some new entries are known, the -signal KIO::ListJob::entries() is emitted. +signal TDEIO::ListJob::entries() is emitted. </para></listitem> </varlistentry> -<varlistentry><term>KIO::listRecursive(const KURL &url, bool showProgressInfo)</term> +<varlistentry><term>TDEIO::listRecursive(const KURL &url, bool showProgressInfo)</term> <listitem><para> Similar to the listDir() function, but this one is recursive. </para></listitem> </varlistentry> -<varlistentry><term>KIO::copy(const KURL &src, const KURL &dest, bool showProgressInfo)</term> +<varlistentry><term>TDEIO::copy(const KURL &src, const KURL &dest, bool showProgressInfo)</term> <listitem><para> Copies a file or directory. Directories are copied recursively. </para></listitem> </varlistentry> -<varlistentry><term>KIO::move(const KURL &src, const KURL &dest, bool showProgressInfo)</term> +<varlistentry><term>TDEIO::move(const KURL &src, const KURL &dest, bool showProgressInfo)</term> <listitem><para> Moves or renames a file or directory. </para></listitem> </varlistentry> -<varlistentry><term>KIO::del(const KURL &src, bool shred, bool showProgressInfo)</term> +<varlistentry><term>TDEIO::del(const KURL &src, bool shred, bool showProgressInfo)</term> <listitem><para> Deletes a file or directory. </para></listitem> @@ -2753,7 +2753,7 @@ Deletes a file or directory. <title>Directory entries</title> <para> -Both the KIO::stat() and KIO::listDir() jobs return their results as a type +Both the TDEIO::stat() and TDEIO::listDir() jobs return their results as a type UDSEntry, UDSEntryList resp. The latter is defined as QValueList<UDSEntry>. The acronym UDS stands for "Universal directory service". The principle behind it is that the a directory entry only carries the information which an ioslave @@ -2860,14 +2860,14 @@ implementing full asynchronicity is not a priority. For example, in a program that can only handle one document file at a time, there is little that can be done while the program is downloading a file anyway. For these simple cases, there is a mucher simpler API in the form of a set of static functions in -KIO::NetAccess. For example, in order to copy a file, use +TDEIO::NetAccess. For example, in order to copy a file, use </para> <programlisting> KURL source, target; source = ...; target = ... -KIO::NetAccess::copy(source, target); +TDEIO::NetAccess::copy(source, target); </programlisting> <para> @@ -2893,9 +2893,9 @@ files regardless of their location is the following code snippet: KURL url; url = ...; QString tempFile; -if (KIO::NetAccess::download(url, tempFile) { +if (TDEIO::NetAccess::download(url, tempFile) { // load the file with the name tempFile - KIO::NetAccess::removeTempFile(tempFile); + TDEIO::NetAccess::removeTempFile(tempFile); } </programlisting> @@ -2921,7 +2921,7 @@ cache, you can use: void FooClass::reloadPage() { KURL url("http://www.kdevelop.org/index.html"); - KIO::TransferJob *job = KIO::get(url, true, false); + TDEIO::TransferJob *job = TDEIO::get(url, true, false); job->addMetaData("cache", "reload"); ... } @@ -2941,18 +2941,18 @@ is the following: void FooClass::printModifiedDate() { KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); - KIO::TransferJob *job = KIO::get(url, true, false); - connect( job, SIGNAL(result(KIO::Job*)), - this, SLOT(transferResult(KIO::Job*)) ); + TDEIO::TransferJob *job = TDEIO::get(url, true, false); + connect( job, SIGNAL(result(TDEIO::Job*)), + this, SLOT(transferResult(TDEIO::Job*)) ); } -void FooClass::transferResult(KIO::Job *job) +void FooClass::transferResult(TDEIO::Job *job) { QString mimetype; if (job->error()) job->showErrorDialog(); else { - KIO::TransferJob *transferJob = (KIO::TransferJob*) job; + TDEIO::TransferJob *transferJob = (TDEIO::TransferJob*) job; QString modified = transferJob->queryMetaData("modified"); cout << "Last modified: " << modified << endl; } @@ -3004,8 +3004,8 @@ follows: <programlisting> KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); -KIO::TransferJob *job = KIO::get(url, true, false); -KIO::Scheduler::scheduleJob(job); +TDEIO::TransferJob *job = TDEIO::get(url, true, false); +TDEIO::Scheduler::scheduleJob(job); </programlisting> <para> @@ -3015,22 +3015,22 @@ the same server. Only one IMAP connection at a time should be enforced. In this case, the application must explicitly deal with the notion of a slave. It has to deallocate a slave for a certain connection and then assign all jobs which should go through the same connection to the same slave. This can again -be easily achieved by using the KIO::Scheduler: +be easily achieved by using the TDEIO::Scheduler: </para> <programlisting> KURL baseUrl("imap://bernd@albert.physik.hu-berlin.de"); -KIO::Slave *slave = KIO::Scheduler::getConnectedSlave(baseUrl); +TDEIO::Slave *slave = TDEIO::Scheduler::getConnectedSlave(baseUrl); -KIO::TransferJob *job1 = KIO::get(KURL(baseUrl, "/INBOX;UID=79374")); -KIO::Scheduler::assignJobToSlave(slave, job1); +TDEIO::TransferJob *job1 = TDEIO::get(KURL(baseUrl, "/INBOX;UID=79374")); +TDEIO::Scheduler::assignJobToSlave(slave, job1); -KIO::TransferJob *job2 = KIO::get(KURL(baseUrl, "/INBOX;UID=86793")); -KIO::Scheduler::assignJobToSlave(slave, job2); +TDEIO::TransferJob *job2 = TDEIO::get(KURL(baseUrl, "/INBOX;UID=86793")); +TDEIO::Scheduler::assignJobToSlave(slave, job2); ... -KIO::Scheduler::disconnectSlave(slave); +TDEIO::Scheduler::disconnectSlave(slave); </programlisting> <para> @@ -3142,10 +3142,10 @@ int kdemain(int argc, char **argv) <title>Implementing an ioslave</title> <para> -Slaves are implemented as subclasses of <classname>KIO::SlaveBase</classname> +Slaves are implemented as subclasses of <classname>TDEIO::SlaveBase</classname> (FtpSlave in the above example). Thus, the actions listed in the <literal>.protocol</literal> correspond to certain virtual functions in -<classname>KIO::SlaveBase</classname> the slave implementation must +<classname>TDEIO::SlaveBase</classname> the slave implementation must reimplement. Here is a list of possible actions and the corresponding virtual functions: </para> @@ -3202,8 +3202,8 @@ All these implementation should end with one of two calls: If the operation was successful, they should call <literal>finished()</literal>. If an error has occurred, <literal>error()</literal> should be called with an error code as first argument and a string in the second. Possible error codes are listed as enum -<type>KIO::Error</type>. The second argument is usually the URL in -question. It is used e.g. in <function>KIO::Job::showErrorDialog()</function> +<type>TDEIO::Error</type>. The second argument is usually the URL in +question. It is used e.g. in <function>TDEIO::Job::showErrorDialog()</function> in order to parameterize the human-readable error message. </para> @@ -3242,7 +3242,7 @@ the transfer is finished. <listitem><para> <function>listDir()</function> reports information about the entries of a directory. For this purpose, call <function>listEntries()</function> with a -<classname>KIO::UDSEntryList</classname> as argument. Analogously to +<classname>TDEIO::UDSEntryList</classname> as argument. Analogously to <function>data()</function>, you can call this several times. When you are finished, call <function>listEntry()</function> with the second argument set to true. You may also call <function>totalSize()</function> to report the @@ -3252,7 +3252,7 @@ total number of directory entries, if known. <listitem><para> <function>stat()</function> reports information about a file like size, MIME type, etc. Such information is packaged in a -<classname>KIO::UDSEntry</classname>, which will be discussed below. Use +<classname>TDEIO::UDSEntry</classname>, which will be discussed below. Use <function>statEntry()</function> to send such an item to the application. </para></listitem> @@ -3295,7 +3295,7 @@ to be overwritten. as the message "Retrieving data from <host>" from the http slave, which is often displayed in the status bar of the program. On the application side, this method corresponds to the signal -<function>KIO::Job::infoMessage()</function>. +<function>TDEIO::Job::infoMessage()</function>. </para></listitem> <listitem><para> |