KIO
renamedialogplugin.cpp
Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2001, 2006 Holger Freyther <freyther@kde.org> 00003 * 00004 * Redistribution and use in source and binary forms, with or without 00005 * modification, are permitted provided that the following conditions 00006 * are met: 00007 * 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 00014 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00015 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00016 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00017 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00018 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00019 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00020 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00021 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00022 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00023 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00024 */ 00025 00026 00027 #include "kio/renamedialogplugin.h" 00028 00029 using namespace KIO; 00030 00031 class RenameDialogPlugin::FileItem::FileItemPrivate 00032 { 00033 public: 00034 FileItemPrivate( const KUrl& url, const QString& mimeType, 00035 const KIO::filesize_t size, time_t ctime, 00036 time_t mtime ) 00037 : m_url( url ) 00038 , m_mimeType( mimeType ) 00039 , m_fileSize( size ) 00040 , m_ctime( ctime ) 00041 , m_mtime( mtime ) 00042 {} 00043 KUrl m_url; 00044 QString m_mimeType; 00045 KIO::filesize_t m_fileSize; 00046 time_t m_ctime; 00047 time_t m_mtime; 00048 }; 00049 00057 RenameDialogPlugin::FileItem::FileItem( const KUrl& url, const QString& mimeType, 00058 KIO::filesize_t size, time_t ctime, 00059 time_t mtime ) 00060 : d( new FileItemPrivate(url, mimeType, size, ctime, mtime) ) 00061 {} 00062 00063 RenameDialogPlugin::FileItem::~FileItem() 00064 { 00065 delete d; 00066 } 00067 00068 KUrl RenameDialogPlugin::FileItem::url() const { 00069 return d->m_url; 00070 } 00071 00072 QString RenameDialogPlugin::FileItem::mimeType() const { 00073 return d->m_mimeType; 00074 } 00075 00076 KIO::filesize_t RenameDialogPlugin::FileItem::fileSize() const { 00077 return d->m_fileSize; 00078 } 00079 00080 time_t RenameDialogPlugin::FileItem::cTime() const { 00081 return d->m_ctime; 00082 } 00083 00084 time_t RenameDialogPlugin::FileItem::mTime() const { 00085 return d->m_mtime; 00086 } 00087 00088 00089 RenameDialogPlugin::RenameDialogPlugin( QDialog* dlg) 00090 : QWidget( dlg ) 00091 {} 00092 00093 #include "renamedialogplugin.moc"
KDE 4.6 API Reference