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

KDEUI

dialog.h

Go to the documentation of this file.
00001 // -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*-
00002 /*
00003  * dialog.h
00004  *
00005  * Copyright (C)  2003  Zack Rusin <zack@kde.org>
00006  * Copyright (C)  2009  Michel Ludwig <michel.ludwig@kdemail.net>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00021  * 02110-1301  USA
00022  */
00023 #ifndef SONNET_DIALOG_H
00024 #define SONNET_DIALOG_H
00025 
00026 #include <kdialog.h>
00027 
00028 class QListWidgetItem;
00029 class QModelIndex;
00030 
00031 namespace Sonnet
00032 {
00033     class BackgroundChecker;
00034 
00050     class KDEUI_EXPORT Dialog : public KDialog
00051     {
00052         Q_OBJECT
00053     public:
00054         Dialog(BackgroundChecker *checker,
00055                QWidget *parent);
00056         ~Dialog();
00057 
00058         QString originalBuffer() const;
00059         QString buffer() const;
00060 
00061         void show();
00062         void activeAutoCorrect(bool _active);
00063 
00064         // Hide warning about done(), which is a slot in QDialog and a signal here.
00065         using KDialog::done;
00066 
00079          void showProgressDialog(int timeout = 500);
00080 
00087         void showSpellCheckCompletionMessage( bool b = true );
00088 
00095         void setSpellCheckContinuedAfterReplacement( bool b );
00096 
00097     public Q_SLOTS:
00098         void setBuffer(const QString &);
00099 
00100     Q_SIGNALS:
00106         void done( const QString& newBuffer );
00107         void misspelling( const QString& word, int start );
00108         void replace( const QString& oldWord, int start,
00109                       const QString& newWord );
00110 
00111         void stop();
00112         void cancel();
00113         void autoCorrect( const QString & currentWord, const QString & replaceWord );
00114 
00119         void spellCheckStatus(const QString &);
00120 
00128         void languageChanged( const QString &language );
00129 
00130     private Q_SLOTS:
00131         void slotMisspelling(const QString& word, int start );
00132         void slotDone();
00133 
00134         void slotFinished();
00135         void slotCancel();
00136 
00137         void slotAddWord();
00138         void slotReplaceWord();
00139         void slotReplaceAll();
00140         void slotSkip();
00141         void slotSkipAll();
00142         void slotSuggest();
00143         void slotChangeLanguage( const QString& );
00144         void slotSelectionChanged(const QModelIndex &);
00145         void slotAutocorrect();
00146 
00147         void setGuiEnabled(bool b);
00148         void setProgressDialogVisible(bool b);
00149 
00150     private:
00151         void updateDialog( const QString& word );
00152         void updateDictionaryComboBox();
00153         void fillSuggestions( const QStringList& suggs );
00154         void initConnections();
00155         void initGui();
00156         void continueChecking();
00157 
00158     private:
00159         class Private;
00160         Private* const d;
00161         Q_DISABLE_COPY( Dialog )
00162     };
00163 }
00164 
00165 #endif

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • 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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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