• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

kjots

KJotsMain.h

Go to the documentation of this file.
00001 //
00002 //  kjots
00003 //
00004 //  Copyright (C) 1997 Christoph Neerfeld <Christoph.Neerfeld@home.ivm.de>
00005 //  Copyright (C) 2002, 2003 Aaron J. Seigo <aseigo@kde.org>
00006 //  Copyright (C) 2003 Stanislav Kljuhhin <crz@hot.ee>
00007 //  Copyright (C) 2005-2006 Jaison Lee <lee.jaison@gmail.com>
00008 //
00009 //  This program is free software; you can redistribute it and/or modify
00010 //  it under the terms of the GNU General Public License as published by
00011 //  the Free Software Foundation; either version 2 of the License, or
00012 //  (at your option) any later version.
00013 //
00014 //  This program is distributed in the hope that it will be useful,
00015 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 //  GNU General Public License for more details.
00018 //
00019 //  You should have received a copy of the GNU General Public License
00020 //  along with this program; if not, write to the Free Software
00021 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00022 //
00023 
00024 #ifndef KJotsMain_included
00025 #define KJotsMain_included
00026 
00027 #include <QPushButton>
00028 
00029 #include <kdialog.h>
00030 #include <kxmlguiwindow.h>
00031 #include <QSplitter>
00032 #include <QTreeWidget>
00033 #include <QTreeWidgetItem>
00034 #include "ui_confpagemisc.h"
00035 
00036 class QTimer;
00037 class QTextEdit;
00038 class QLabel;
00039 class QStackedWidget;
00040 class QCheckBox;
00041 
00042 class KAction;
00043 class KActionMenu;
00044 class KActionCollection;
00045 class KFindDialog;
00046 class KReplaceDialog;
00047 class KJotsMain;
00048 
00049 class Bookshelf;
00050 class KJotsPage;
00051 class KJotsEdit;
00052 class KJotsBrowser;
00053 class KJob;
00054 
00055 class confPageMisc : public QDialog, public Ui::confPageMisc
00056 {
00057 public:
00058   confPageMisc( QWidget *parent ) : QDialog( parent ) {
00059     setupUi( this );
00060   }
00061 };
00062 
00063 
00064 class KJotsMain : public KXmlGuiWindow
00065 {
00066     Q_OBJECT
00067 
00068     public:
00069         KJotsMain();
00070 
00071         QTextEdit* activeEditor();
00072 
00073     protected:
00074         enum ExportType { Ascii, HTML, Native };
00075 
00076     public slots:
00077         void updateCaption();
00078         void updateMenu();
00079 
00080     protected slots:
00081         void DelayedInitialization();
00082         bool createNewBook();
00083         void deleteBook();
00084         void deletePage();
00085         void deleteMultiple();
00086         void newPage();
00087         void onRenameEntry();
00088         void configure();
00089         void updateConfiguration();
00090 
00091         void copySelection();
00092         void insertDate();
00093         void onPrint();
00094         void onQuit();
00095         
00096         void onShowSearch();
00097         void onUpdateSearch();
00098         void onStartSearch();
00099         void onRepeatSearch();
00100         void onEndSearch();
00101         
00102         void onShowReplace();
00103         void onUpdateReplace();
00104         void onStartReplace();
00105         void onRepeatReplace();
00106         void onEndReplace();
00107 
00108         void onItemRenamed(QTreeWidgetItem*, int);
00109         void saveAscii();
00110         void saveHtml();
00111         void saveNative();
00112         void saveToFile(ExportType);
00113         void saveFinished(KJob *);
00114         void importBook();
00115 
00116         void autoSave(void);
00117 
00118     protected:
00119         bool queryClose();
00120         int search(bool);
00121 
00122         KJotsEdit      *editor;
00123         KJotsBrowser   *browser;
00124         Bookshelf      *bookshelf;
00125         QSplitter      *splitter;
00126         QStackedWidget *stackedWidget;
00127         QFont           m_font;
00128         QTimer         *m_autosaveTimer;
00129 
00130         KActionMenu *exportMenu, *bookmarkMenu;
00131         KActionCollection *selectionOnlyActions, *pageOnlyActions, *bookOnlyActions;
00132         
00133         KFindDialog *searchDialog;
00134         QStringList searchHistory;
00135         int searchBeginPos, searchEndPos, searchPos;
00136         QCheckBox *searchAllPages;
00137 
00138         KReplaceDialog *replaceDialog;
00139         QStringList replaceHistory;
00140         int replaceBeginPos, replaceEndPos, replacePos;
00141         QCheckBox *replaceAllPages;
00142         KJotsPage *replaceStartPage;
00143 };
00144 
00145 // Mostly stolen from kdelibs/kdeui/findreplace/kreplace.cpp
00146 class KJotsReplaceNextDialog : public KDialog
00147 {
00148 Q_OBJECT
00149 public:
00150     KJotsReplaceNextDialog( QWidget *parent );
00151     void setLabel( const QString& pattern, const QString& replacement );
00152     int answer() { return m_answer; }
00153 protected slots:
00154     void onHandleAll(void);
00155     void onHandleSkip(void);
00156     void onHandleReplace(void);
00157 
00158 private:
00159     QLabel* m_mainLabel;
00160     int m_answer;
00161 };
00162 
00163 #endif // KJotsMain_included
00164 /* ex: set tabstop=4 softtabstop=4 shiftwidth=4 expandtab: */
00165 /* kate: tab-indents off; replace-tabs on; tab-width 4; remove-trailing-space on; encoding utf-8;*/

kjots

Skip menu "kjots"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
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