Kross
form.cpp
Go to the documentation of this file.
121 QObject::connect(d->filewidget, SIGNAL(fileSelected(QString)), this, SLOT(slotFileSelected(QString)));
123 QObject::connect(d->filewidget, SIGNAL(fileSelected(QString)), this, SIGNAL(fileSelected(QString)));
124 QObject::connect(d->filewidget, SIGNAL(fileHighlighted(QString)), this, SIGNAL(fileHighlighted(QString)));
126 QObject::connect(d->filewidget, SIGNAL(filterChanged(QString)), this, SIGNAL(filterChanged(QString)));
159 f.replace(QRegExp("([^\\\\]{1,1})/"), "\\1\\/"); // escape '/' chars else KFileDialog assumes they are mimetypes :-/
219 FormProgressDialog::FormProgressDialog(const QString& caption, const QString& labelText) : KPageDialog(), d(new Private)
302 if( KMessageBox::messageBox(this, KMessageBox::WarningContinueCancel, i18n("Cancel?")) == KMessageBox::Continue ) {
416 static KPageWidgetItem* formAddPage(KPageDialog* dialog, const QString& name, const QString& header, const QString& iconname)
433 QWidget* FormDialog::addPage(const QString& name, const QString& header, const QString& iconname)
435 return d->items.insert(name, formAddPage((KPageDialog*)this,name,header,iconname)).value()->widget();
532 QWidget* FormAssistant::addPage(const QString& name, const QString& header, const QString& iconname)
534 return d->items.insert(name, formAddPage((KPageDialog*)this,name,header,iconname)).value()->widget();
606 virtual QLayout* createLayout(const QString& className, QObject* parent = 0, const QString& name = QString())
610 virtual QWidget* createWidget(const QString& className, QWidget* parent = 0, const QString& name = QString())
645 QString FormModule::showMessageBox(const QString& dialogtype, const QString& caption, const QString& message, const QString& details)
715 QWidget* FormModule::createWidget(QWidget* parent, const QString& className, const QString& name)
746 QString i18nd=e.attribute("comment").isEmpty()?QObject::tr(e.text().toUtf8()):QObject::tr(e.text().toUtf8(),e.attribute("comment").toUtf8());
774 kDebug() << QString("Kross::FormModule::createWidgetFromUIFile: There exists no such file \"%1\"").arg(filename);
778 kDebug() << QString("Kross::FormModule::createWidgetFromUIFile: Failed to open the file \"%1\"").arg(filename);
QLayout * layout() const
void setAppropriate(const QString &name, bool appropriate)
Definition: form.cpp:541
QString i18n(const char *text)
QWidget * activeModalWidget()
FormProgressDialog(const QString &caption, const QString &labelText)
Definition: form.cpp:219
const char * valueToKey(int value) const
QObject * createLayout(QWidget *parent, const QString &layout)
Create and return a new QWidget instance.
Definition: form.cpp:694
void setModal(bool modal)
QCursor cursor() const
QWidget * createWidgetFromUIFile(QWidget *parent, const QString &filename)
Create and return a new QWidget instance.
Definition: form.cpp:770
DialogType
void fileSelected(const QString &file)
Emitted when the user selects a file.
int indexOfEnumerator(const char *name) const
QDomNode appendChild(const QDomNode &newChild)
void setRange(int minimum, int maximum)
Set the minimum and maximum range of the progressbar.
Definition: form.cpp:277
QString showMessageBox(const QString &dialogtype, const QString &caption, const QString &message, const QString &details=QString())
Show a messagebox.
Definition: form.cpp:645
QString attribute(const QString &name, const QString &defValue) const
bool isAppropriate(KPageWidgetItem *page) const
virtual QWidget * widget()
void setMinimumWidth(int minw)
static void detailedError(QWidget *parent, const QString &text, const QString &details, const QString &caption=QString(), Options options=Notify)
virtual void back()
virtual const QMetaObject * metaObject() const
QWidget * createWidgetFromUI(QWidget *parent, const QString &xml)
Create and return a new QWidget instance.
Definition: form.cpp:734
int exec()
virtual void done(int r)
The FormFileWidget class provides access to a KFileWidget.
Definition: form.h:55
bool exists() const
The FormDialog class provides access to KDialog objects as top-level containers.
Definition: form.h:232
int exec()
Shows the dialog as a modal dialog, blocking until the user closes it and returns the execution resul...
Definition: form.cpp:312
void addText(const QString &text)
Add to the HTML-text that is displayed as information the text text .
Definition: form.cpp:288
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
virtual void next()
QWidget * createWidget(const QString &className)
Create and return a new QWidget instance.
Definition: form.cpp:708
QString tr(const char *sourceText, const char *disambiguation, int n)
void addItem(const QString &label)
void update()
static int messageBox(QWidget *parent, DialogType type, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes=KStandardGuiItem::yes(), const KGuiItem &buttonNo=KStandardGuiItem::no(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontShowAskAgainName=QString(), Options options=Notify)
void fileHighlighted(const QString &)
Emitted when the user highlights a file.
bool isNull() const
QDomNode nextSibling() const
QWidget * createDialog(const QString &caption)
Create and return a new FormDialog instance.
Definition: form.cpp:684
void setIcon(const KIcon &icon)
QWidget * addPage(const QString &name, const QString &header=QString(), const QString &iconname=QString())
Add and return a new page.
Definition: form.cpp:433
QDomElement toElement() const
void setMinimumSize(const QSize &)
void setValid(const QString &name, bool enable)
Definition: form.cpp:552
const char * name() const
QWidget * activeWindow()
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
void setLayout(QLayout *layout)
void selectionChanged()
Emitted when the user hilights one or more files in multiselection mode.
QDomDocument ownerDocument() const
QString text() const
void clear()
void setAppropriate(KPageWidgetItem *page, bool appropriate)
bool isValid(KPageWidgetItem *page) const
QWidget * showProgressDialog(const QString &caption, const QString &labelText)
Show a progressdialog to provide visible feedback on the progress of a slow operation.
Definition: form.cpp:679
QDomNodeList elementsByTagName(const QString &tagname) const
bool isEmpty() const
QByteArray readAll()
bool isAppropriate(const QString &name) const
Definition: form.cpp:537
virtual bool open(QFlags< QIODevice::OpenModeFlag > flags)
void setMode(const QString &mode)
Set the Mode the FormFileWidget should have to mode .
Definition: form.cpp:144
QAction * createAction(QObject *parent)
Create and return a new QAction instance.
Definition: form.cpp:802
QListWidgetItem * item(int row) const
QString path(AdjustPathOption trailing=LeaveTrailingSlash) const
int count() const
bool setButtonText(const QString &button, const QString &text)
Set the text of a button.
Definition: form.cpp:372
void setMargin(int margin)
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
void setText(const QString &text)
Set the HTML-text that is displayed as information to the text text .
Definition: form.cpp:282
void backClicked()
void setSizePolicy(QSizePolicy)
void addWidget(QWidget *w)
int currentRow() const
int keysToValue(const char *keys) const
The FormModule provides access to UI functionality like dialogs or widgets.
Definition: form.h:525
QDomText createTextNode(const QString &value)
QMetaEnum enumerator(int index) const
void currentPageChanged(KPageWidgetItem *current, KPageWidgetItem *before)
QDomNode removeChild(const QDomNode &oldChild)
QWidget * widget() const
QWidget * createFileWidget(QWidget *parent, const QString &startDirOrVariable=QString())
Create and return a new FormFileWidget instance.
Definition: form.cpp:786
virtual void close()
void canceled()
This signal got emitted if the user requests to cancel the operation.
bool isNull() const
QString & replace(int position, int n, QChar after)
void setMainWidget(QWidget *newMainWidget)
Set the newMainWidget QWidget as main widget.
Definition: form.cpp:438
bool isValid() const
QDomNode firstChild() const
QByteArray toLatin1() const
bool isCharacterData() const
void filterChanged(const QString &filter)
Emitted when the filter changed, i.e.
void setValid(KPageWidgetItem *page, bool enable)
QObject * loadPart(QWidget *parent, const QString &name, const QUrl &url=QUrl())
Load and return a KPart component.
Definition: form.cpp:807
QWidget(QWidget *parent, QFlags< Qt::WindowType > f)
void setCaption(const QString &c)
QString name
static void detailedSorry(QWidget *parent, const QString &text, const QString &details, const QString &caption=QString(), Options options=Notify)
void setMinimumHeight(int minh)
QWidget * load(QIODevice *device, QWidget *parentWidget)
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QWidget * createAssistant(const QString &caption)
Create and return a new FormAssistant instance.
Definition: form.cpp:689
void setHeader(const QString &header)
void setMimeFilter(const QStringList &filter)
Set the mimetype filter to filter .
Definition: form.cpp:168
void show()
int size() const
The FormProgressDialog class provides access to progressbar.
Definition: form.h:155
QWidget * addPage(const QString &name, const QString &header=QString(), const QString &iconname=QString())
Add and return a new page.
Definition: form.cpp:532
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
static KPageWidgetItem * formAddPage(KPageDialog *dialog, const QString &name, const QString &header, const QString &iconname)
Definition: form.cpp:416
QObject * parent() const
QWidget * createListView(QWidget *parent)
Create and return a new FormListView instance.
Definition: form.cpp:794
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
bool isCanceled()
Returns true if the user requested to cancel the operation.
Definition: form.cpp:321
QString text() const
void setSpacing(int spacing)
QByteArray toByteArray(int indent) const
#define KDE_EXPORT
QDomNode at(int index) const
bool setContent(const QByteArray &data, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)
FormFileWidget(QWidget *parent, const QString &startDirOrVariable)
Definition: form.cpp:107
The FormAssistant class provides access to KAssistantDialog objects as top-level containers.
Definition: form.h:383
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.