• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Kross

form.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  * form.h
00003  * This file is part of the KDE project
00004  * copyright (C)2006-2007 by Sebastian Sauer (mail@dipe.org)
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this program; see the file COPYING.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  ***************************************************************************/
00019 
00020 #ifndef KROSS_FORM_H
00021 #define KROSS_FORM_H
00022 
00023 #include <QtGui/QWidget>
00024 #include <QtCore/QUrl>
00025 
00026 #include <kpagedialog.h>
00027 //#include <kfilewidget.h>
00028 
00029 namespace Kross {
00030 
00034     class FormFileWidget : public QWidget
00035     {
00036             Q_OBJECT
00037             Q_ENUMS(Mode)
00038 
00039         public:
00040             FormFileWidget(QWidget* parent, const QString& startDirOrVariable);
00041             virtual ~FormFileWidget();
00042 
00046             enum Mode { Other = 0, Opening, Saving };
00047 
00048         public Q_SLOTS:
00049 
00054             void setMode(const QString& mode);
00055 
00059             QString currentFilter() const;
00060 
00064             void setFilter(const QString &filter);
00065 
00069             QString currentMimeFilter() const;
00070 
00074             void setMimeFilter(const QStringList& filter);
00075 
00079             QString selectedFile() const;
00080 
00081             //QStringList selectedFiles() const { return KFileDialog::selectedFiles(); }
00082             //QString selectedUrl() const { return KFileDialog::selectedUrl().toLocalFile(); }
00083 
00084         Q_SIGNALS:
00085 
00090             void fileSelected(const QString& file);
00091 
00095             void fileHighlighted(const QString&);
00096 
00100             void selectionChanged();
00101 
00106             void filterChanged(const QString& filter);
00107 
00108         private:
00110             class Private;
00112             Private* const d;
00113     };
00114 
00131     class FormProgressDialog : public KPageDialog
00132     {
00133             Q_OBJECT
00134         public:
00135             FormProgressDialog(const QString& caption, const QString& labelText);
00136             virtual ~FormProgressDialog();
00137             virtual void done(int r);
00138         public Q_SLOTS:
00142             void setValue(int progress);
00146             void setRange(int minimum, int maximum);
00150             void setText(const QString& text);
00154             void addText(const QString& text);
00163             int exec();
00169             int exec_loop() { return exec(); }
00173             bool isCanceled();
00174         Q_SIGNALS:
00178             void canceled();
00179         private:
00181             class Private;
00183             Private* const d;
00184     };
00185 
00204     class FormDialog : public KPageDialog
00205     {
00206             Q_OBJECT
00207 
00208         public:
00209             FormDialog(const QString& caption);
00210             virtual ~FormDialog();
00211 
00212         public Q_SLOTS:
00213 
00222             bool setButtons(const QString& buttons);
00223 
00230             bool setFaceType(const QString& facetype);
00231 
00236             QString currentPage() const;
00237 
00243             bool setCurrentPage(const QString& name);
00244 
00249             QWidget* page(const QString& name) const;
00250 
00263             QWidget* addPage(const QString& name, const QString& header = QString(), const QString& iconname = QString());
00264 
00273             int exec() { return KDialog::exec(); }
00274 
00280             int exec_loop() { return exec(); }
00281 
00285             QString result();
00286 
00287         private Q_SLOTS:
00288             virtual void slotButtonClicked(int button);
00289             void slotCurrentPageChanged(KPageWidgetItem* current);
00290 
00291         private:
00293             class Private;
00295             Private* const d;
00296     };
00297 
00314     class FormModule : public QObject
00315     {
00316             Q_OBJECT
00317 
00318         public:
00319             explicit FormModule();
00320             virtual ~FormModule();
00321 
00322         public Q_SLOTS:
00323 
00328             QWidget* activeModalWidget();
00329 
00334             QWidget* activeWindow();
00335 
00359             QString showMessageBox(const QString& dialogtype, const QString& caption, const QString& message, const QString& details = QString());
00360 
00369             QWidget* showProgressDialog(const QString& caption, const QString& labelText);
00370 
00376             QWidget* createDialog(const QString& caption);
00377 
00389             QObject* createLayout(QWidget* parent, const QString& layout);
00390 
00400             QWidget* createWidget(const QString& className);
00401 
00411             QWidget* createWidget(QWidget* parent, const QString& className, const QString& name = QString());
00412 
00420             QWidget* createWidgetFromUI(QWidget* parent, const QString& xml);
00421 
00429             QWidget* createWidgetFromUIFile(QWidget* parent, const QString& filename);
00430 
00439             QWidget* createFileWidget(QWidget* parent, const QString& startDirOrVariable = QString());
00440 
00447             QObject* loadPart(QWidget* parent, const QString& name, const QUrl& url = QUrl());
00448 
00449         private:
00451             class Private;
00453             Private* const d;
00454     };
00455 }
00456 
00457 #endif
00458 

Kross

Skip menu "Kross"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   WTF
  • KJSEmbed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  •   core
  • Phonon
  •   Backend
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal