kjots
kjotsedit.cpp
Go to the documentation of this file.
78 connect( m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(selectionChanged(QItemSelection,QItemSelection)) );
79 connect( m_selectionModel->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), SLOT(tryDisableEditing()) );
114 connect(actionCollection->action(QLatin1String("auto_bullet")), SIGNAL(triggered()), SLOT(onAutoBullet()));
115 connect(actionCollection->action(QLatin1String("auto_decimal")), SIGNAL(triggered()), SLOT(onAutoDecimal())); //auto decimal list
116 connect(actionCollection->action(QLatin1String("manage_link")), SIGNAL(triggered()), SLOT(onLinkify()));
117 connect(actionCollection->action(QLatin1String("insert_checkmark")), SIGNAL(triggered()), SLOT(addCheckmark()));
118 connect(actionCollection->action(QLatin1String("manual_save")), SIGNAL(triggered()), SLOT(savePage()));
119 connect(actionCollection->action(QLatin1String("insert_date")), SIGNAL(triggered()), SLOT(insertDate()));
128 void KJotsEdit::selectionChanged( const QItemSelection& selected, const QItemSelection& deselected )
217 {//this is an adaptation of Qt's createAutoBulletList() function for creating a bulleted list, except in this case I use it to create a decimal list.
271 QPointer<KJotsLinkDialog> linkDialog = new KJotsLinkDialog( const_cast<QAbstractItemModel *>(m_selectionModel->model()), this);
319 while ((styleBegin = str.indexOf(QLatin1String("style=\""), styleBegin, Qt::CaseInsensitive) + 7) != (-1 + 7)) {
323 while ((styleFragmentEnd = str.indexOf(QLatin1String(";"), styleFragmentEnd) + 1) != (-1 + 1)) {
326 if (str.mid(styleFragmentStart, fragmentLength).contains(QLatin1String("margin"), Qt::CaseInsensitive))
422 /* kate: tab-indents off; replace-tabs on; tab-width 4; remove-trailing-space on; encoding utf-8;*/
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
void removeSelectedText()
Type type() const
QByteArray data(const QString &mimeType) const
void setStyle(Style style)
QTextList * createList(const QTextListFormat &format)
bool contains(const QString &str, Qt::CaseSensitivity cs) const
QTextList * currentList() const
virtual bool canInsertFromMimeData(const QMimeData *) const
Definition: kjotsedit.cpp:289
T value() const
QString & remove(int position, int n)
QString toString(QFlags< QUrl::FormattingOption > options) const
virtual void mouseReleaseEvent(QMouseEvent *)
Override to make ctrl+click follow links.
Definition: kjotsedit.cpp:349
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Definition: kjotsedit.cpp:128
Definition: kjotsedit.h:35
bool movePosition(MoveOperation operation, MoveMode mode, int n)
int size() const
void setIndent(int indentation)
Definition: kjotslinkdialog.h:35
void setIndent(int indentation)
QString fromUtf8(const char *str, int size)
bool hasHtml() const
void setCurrentWidget(QWidget *widget)
Qt::MouseButton button() const
void endEditBlock()
bool isEmpty() const
QModelIndexList selectedRows(int column) const
void setBlockFormat(const QTextBlockFormat &format)
bool hasSelection() const
QString path() const
int indent() const
qulonglong toULongLong(bool *ok, int base) const
QString scheme() const
Qt::KeyboardModifiers modifiers() const
QTextBlock block() const
bool contains(QChar ch, Qt::CaseSensitivity cs) const
void beginEditBlock()
QVariant fromValue(const T &value)
QString text() const
void delayedInitialization(KActionCollection *)
Definition: kjotsedit.cpp:110
Definition: kjotsmodel.h:84
bool isValid() const
QString mid(int position, int n) const
bool hasUrls() const
QVariant data(int role) const
QList< QUrl > urls() const
int length() const
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
QString fromLatin1(const char *str, int size)
virtual QStringList formats() const
virtual void insertFromMimeData(const QMimeData *)
Definition: kjotsedit.cpp:300
void mousePopupMenuImplementation(const QPoint &pos)
Definition: kjotsedit.cpp:86
bool setProperty(const char *name, const QVariant &value)
const QPoint & pos() const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QString html() const
const QAbstractItemModel * model() const
QTextBlockFormat blockFormat() const
void setEnabled(bool)
QByteArray toEncoded(QFlags< QUrl::FormattingOption > options) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:12 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:32:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.