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

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • kdeui
  • sonnet
dialog.h
Go to the documentation of this file.
1 // -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 /*
3  * dialog.h
4  *
5  * Copyright (C) 2003 Zack Rusin <zack@kde.org>
6  * Copyright (C) 2009-2010 Michel Ludwig <michel.ludwig@kdemail.net>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  */
23 #ifndef SONNET_DIALOG_H
24 #define SONNET_DIALOG_H
25 
26 #include <kdialog.h>
27 
28 class QListWidgetItem;
29 class QModelIndex;
30 
31 namespace Sonnet
32 {
33  class BackgroundChecker;
34 
50  class KDEUI_EXPORT Dialog : public KDialog
51  {
52  Q_OBJECT
53  public:
54  Dialog(BackgroundChecker *checker,
55  QWidget *parent);
56  ~Dialog();
57 
58  QString originalBuffer() const;
59  QString buffer() const;
60 
61  void show();
62  void activeAutoCorrect(bool _active);
63 
64  // Hide warning about done(), which is a slot in QDialog and a signal here.
65  using KDialog::done;
66 
79  void showProgressDialog(int timeout = 500);
80 
87  void showSpellCheckCompletionMessage( bool b = true );
88 
95  void setSpellCheckContinuedAfterReplacement( bool b );
96 
97  public Q_SLOTS:
98  void setBuffer(const QString &);
99 
100  Q_SIGNALS:
106  void done( const QString& newBuffer );
107  void misspelling( const QString& word, int start );
108  void replace( const QString& oldWord, int start,
109  const QString& newWord );
110 
111  void stop();
112  void cancel();
113  void autoCorrect( const QString & currentWord, const QString & replaceWord );
114 
119  void spellCheckStatus(const QString &);
120 
128  void languageChanged( const QString &language );
129 
130  private Q_SLOTS:
131  void slotMisspelling(const QString& word, int start );
132  void slotDone();
133 
134  void slotFinished();
135  void slotCancel();
136 
137  void slotAddWord();
138  void slotReplaceWord();
139  void slotReplaceAll();
140  void slotSkip();
141  void slotSkipAll();
142  void slotSuggest();
143  void slotChangeLanguage( const QString& );
144  void slotSelectionChanged(const QModelIndex &);
145  void slotAutocorrect();
146 
147  void setGuiEnabled(bool b);
148  void setProgressDialogVisible(bool b);
149 
150  private:
151  void updateDialog( const QString& word );
152  void fillDictionaryComboBox();
153  void updateDictionaryComboBox();
154  void fillSuggestions( const QStringList& suggs );
155  void initConnections();
156  void initGui();
157  void continueChecking();
158 
159  private:
160  class Private;
161  Private* const d;
162  Q_DISABLE_COPY( Dialog )
163  };
164 }
165 
166 #endif
KStandardGuiItem::cancel
KGuiItem cancel()
Returns the 'Cancel' gui item.
Definition: kstandardguiitem.cpp:113
kdialog.h
QModelIndex
QWidget
timeout
int timeout
QListWidgetItem
QDialog::done
virtual void done(int r)
KDialog
A dialog base class with standard buttons and predefined layouts.
Definition: kdialog.h:128
Sonnet::Dialog
Spellcheck dialog.
Definition: dialog.h:50
QString
QStringList
KStandardAction::replace
KAction * replace(const QObject *recvr, const char *slot, QObject *parent)
Find and replace matches.
Definition: kstandardaction.cpp:344
Sonnet::BackgroundChecker
KStandardGuiItem::stop
KGuiItem stop()
Returns the 'Stop' gui item.
Definition: kstandardguiitem.cpp:279
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal