knode
utilities.cpp
Go to the documentation of this file.
70 i18n("<qt>A file named <b>%1</b> already exists.<br />Do you want to replace it?</qt>", url.path()),
163 int KNHelper::selectDialog(QWidget *parent, const QString &caption, const QStringList &options, int initialValue)
286 QString KNHelper::rewrapStringList(const QStringList &text, int wrapAt, QChar quoteChar, bool stopAtSig, bool alwaysSpace)
317 if(thisLine.isEmpty() || (thisPrefix!=lastPrefix) || thisLine.contains(" ") || thisLine.contains('\t'))
346 KMessageBox::error((w!=0)? w : knGlobals.topWidget, i18n("Unable to load/save configuration.\nWrong permissions on home folder?\nYou should close KNode now to avoid data loss."));
KNSaveHelper(QString saveName, QWidget *parent)
Definition: utilities.cpp:38
QFile * getFile(const QString &dialogTitle)
returns a file open for writing
Definition: utilities.cpp:58
static int findStringInFile(QFile *file, const char *str)
Searches for the string from the current file position.
Definition: utilities.cpp:369
virtual bool seek(qint64 pos)
QString & append(QChar ch)
void truncate(int position)
QFile * getFile() const
returns the file after getFile(QString) of setURL(url) was called
Definition: utilities.h:68
static void saveWindowSize(const QString &name, const QSize &s)
Definition: utilities.cpp:205
virtual QByteArray text(quint32 serialNumber) const =0
QString & prepend(QChar ch)
virtual qint64 pos() const
bool isEmpty() const
static void restoreWindowSize(const QString &name, QWidget *d, const QSize &defaultSize)
Definition: utilities.cpp:212
int height() const
QString & remove(int position, int n)
static void displayRemoteFileError(QWidget *w=0)
use this for remote files
Definition: utilities.cpp:356
void addItem(const QString &label)
static const QString encryptStr(const QString &aStr)
Definition: utilities.cpp:228
void clear()
void resize(int w, int h)
static void displayTempFileError(QWidget *w=0)
use this for error on temporary files
Definition: utilities.cpp:362
int indexOf(char ch, int from) const
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
static void displayExternalFileError(QWidget *w=0)
use this for all external files
Definition: utilities.cpp:350
static void displayInternalFileError(QWidget *w=0)
use this for all internal files
Definition: utilities.cpp:344
void setFocus()
bool isEmpty() const
QString trimmed() const
qint64 read(char *data, qint64 maxSize)
static const QString decryptStr(const QString &aStr)
Definition: utilities.cpp:245
void setMargin(int margin)
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
void setCurrentRow(int row)
QString right(int n) const
iterator end()
bool contains(QChar ch, Qt::CaseSensitivity cs) const
static QString rewrapStringList(const QStringList &text, int wrapAt, QChar quoteChar, bool stopAtSig, bool alwaysSpace)
used for rewarping a text when replying to a message or inserting a file into a box ...
Definition: utilities.cpp:286
QString & replace(int position, int n, QChar after)
QByteArray toLatin1() const
int width() const
QPoint pos()
virtual bool atEnd() const
const QChar at(int position) const
typedef ConstIterator
void appendTextWPrefix(QString &result, const QString &text, int wrapAt, const QString &prefix)
Definition: utilities.cpp:267
int length() const
QString left(int n) const
static int selectDialog(QWidget *parent, const QString &caption, const QStringList &options, int initialValue)
list selection dialog, used instead of a popup menu when a select action is called via the keyboard...
Definition: utilities.cpp:163
QFile * setURL(const KUrl &url)
tries to access the file specified by the url and returns a file open for reading ...
Definition: utilities.cpp:129
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
iterator begin()
void setSpacing(int spacing)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:18 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:34:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.