home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / knewstuff / uploaddialog.h < prev   
Encoding:
C/C++ Source or Header  |  2007-01-15  |  2.6 KB  |  104 lines

  1. /*
  2.     This file is part of KOrganizer.
  3.     Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
  4.  
  5.     This library is free software; you can redistribute it and/or
  6.     modify it under the terms of the GNU Library General Public
  7.     License as published by the Free Software Foundation; either
  8.     version 2 of the License, or (at your option) any later version.
  9.  
  10.     This library 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 GNU
  13.     Library General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU Library General Public License
  16.     along with this library; see the file COPYING.LIB.  If not, write to
  17.     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18.     Boston, MA 02110-1301, USA.
  19. */
  20. #ifndef KNEWSTUFF_UPLOADDIALOG_H
  21. #define KNEWSTUFF_UPLOADDIALOG_H
  22.  
  23. #include <kdialogbase.h>
  24.  
  25. class QLineEdit;
  26. class QSpinBox;
  27. class KURLRequester;
  28. class QTextEdit;
  29. class QComboBox;
  30.  
  31. namespace KNS {
  32.  
  33. class Engine;
  34. class Entry;
  35.  
  36. /**
  37.  * @short KNewStuff file upload dialog.
  38.  *
  39.  * Using this dialog, data can easily be uploaded to the Hotstuff servers.
  40.  * It should however not be used on its own, instead a KNewStuff (or
  41.  * KNewStuffGeneric) object invokes it.
  42.  *
  43.  * @author Cornelius Schumacher (schumacher@kde.org)
  44.  * \par Maintainer:
  45.  * Josef Spillner (spillner@kde.org)
  46.  */
  47. class UploadDialog : public KDialogBase
  48. {
  49.     Q_OBJECT
  50.   public:
  51.     /**
  52.       Constructor.
  53.  
  54.       @param engine a KNewStuff engine object to be used for uploads
  55.       @param parent the parent window
  56.     */
  57.     UploadDialog( Engine *engine, QWidget *parent );
  58.  
  59.     /**
  60.       Destructor.
  61.     */
  62.     ~UploadDialog();
  63.  
  64.     /**
  65.       Sets the preview filename.
  66.       This is only meaningful if the application supports previews.
  67.  
  68.       @param previewFile the preview image file
  69.     */
  70.     void setPreviewFile( const QString &previewFile );
  71.  
  72.     /**
  73.       Sets the payload filename.
  74.       This is optional, but necessary if the application wants to support
  75.       reusing previously filled out form data based on the filename.
  76.  
  77.       @param payloadFile the payload data file
  78.     */
  79.     void setPayloadFile( const QString &payloadFile );
  80.  
  81.   protected slots:
  82.     void slotOk();
  83.  
  84.   private:
  85.     Engine *mEngine;
  86.  
  87.     QLineEdit *mNameEdit;
  88.     QLineEdit *mAuthorEdit;
  89.     QLineEdit *mEmailEdit;
  90.     QLineEdit *mVersionEdit;
  91.     QSpinBox *mReleaseSpin;
  92.     KURLRequester *mPreviewUrl;
  93.     QTextEdit *mSummaryEdit;
  94.     QComboBox *mLanguageCombo;
  95.     QComboBox *mLicenceCombo;
  96.  
  97.     QPtrList<Entry> mEntryList;
  98.     KURL mPayloadUrl;
  99. };
  100.  
  101. }
  102.  
  103. #endif
  104.