• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

knotes

knote.h

Go to the documentation of this file.
00001 /*******************************************************************
00002  KNotes -- Notes for the KDE project
00003 
00004  Copyright (c) 1997-2006, The KNotes Developers
00005 
00006  This program is free software; you can redistribute it and/or
00007  modify it under the terms of the GNU General Public License
00008  as published by the Free Software Foundation; either version 2
00009  of the License, or (at your option) any later version.
00010 
00011  This program is distributed in the hope that it will be useful,
00012  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  GNU General Public License for more details.
00015 
00016  You should have received a copy of the GNU General Public License
00017  along with this program; if not, write to the Free Software
00018  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 *******************************************************************/
00020 
00021 #ifndef KNOTE_H
00022 #define KNOTE_H
00023 
00024 #include <QColor>
00025 #include <QDomDocument>
00026 #include <QEvent>
00027 #include <QFrame>
00028 #include <QString>
00029 
00030 #include <kconfig.h>
00031 #include <kxmlguiclient.h>
00032 
00033 class QLabel;
00034 class QLayout;
00035 class QSizeGrip;
00036 
00037 class KFind;
00038 class KMenu;
00039 class KNoteButton;
00040 class KNoteConfig;
00041 class KNoteEdit;
00042 class KSelectAction;
00043 class KToggleAction;
00044 class KToolBar;
00045 
00046 namespace KCal {
00047 class Journal;
00048 }
00049 
00050 
00051 class KNote
00052   : public QFrame, virtual public KXMLGUIClient
00053 {
00054   Q_OBJECT
00055   public:
00056     KNote( QDomDocument buildDoc, KCal::Journal *journal, QWidget *parent = 0 );
00057     ~KNote();
00058     
00059     void saveData();
00060     void saveConfig() const;
00061     
00062     QString noteId() const;
00063     QString name() const;
00064     QString text() const;
00065     
00066     void setName( const QString &name );
00067     void setText( const QString &text );
00068     
00069     void find( const QString &pattern, long options );
00070     
00071     bool isModified() const;
00072     
00073   public slots:
00074     void slotKill( bool force = false );
00075     
00076   signals:
00077     void sigRequestNewNote();
00078     void sigShowNextNote();
00079     void sigNameChanged();
00080     void sigDataChanged();
00081     void sigColorChanged();
00082     void sigKillNote( KCal::Journal * );
00083     
00084     void sigFindFinished();
00085     
00086   protected:
00087     virtual void contextMenuEvent( QContextMenuEvent * );
00088     virtual void showEvent( QShowEvent * );
00089     virtual void resizeEvent( QResizeEvent * );
00090     virtual void closeEvent( QCloseEvent * );
00091     virtual void dropEvent( QDropEvent * );
00092     virtual void dragEnterEvent( QDragEnterEvent * );
00093     
00094     virtual bool event( QEvent * );
00095     virtual bool eventFilter( QObject *, QEvent * );
00096     
00097   private slots:
00098     void slotRename();
00099     void slotUpdateReadOnly();
00100     void slotClose();
00101     
00102     void slotSend();
00103     void slotMail();
00104     void slotPrint();
00105     void slotSaveAs();
00106     
00107     void slotInsDate();
00108     void slotSetAlarm();
00109     
00110     void slotPreferences();
00111     void slotPopupActionToDesktop( int id );
00112     
00113     void slotFindNext();
00114     void slotHighlight( const QString &txt, int idx, int len );
00115     
00116     void slotApplyConfig();
00117     void slotUpdateKeepAboveBelow();
00118     void slotUpdateShowInTaskbar();
00119     void slotUpdateDesktopActions();
00120     
00121   private:
00122     void buildGui();
00123     void createActions();
00124     void createNoteEditor();
00125     void createNoteFooter();
00126     void createNoteHeader();
00127     void prepare();
00128     
00129     void updateFocus();
00130     void updateLayout();
00131     void updateLabelAlignment();
00132     
00133     void setColor( const QColor &, const QColor & );
00134     
00135     void toDesktop( int desktop );
00136     
00137   private:
00138     QLayout       *m_noteLayout;
00139     QLabel        *m_label;
00140     QSizeGrip     *m_grip;
00141     KNoteButton   *m_button;
00142     KToolBar      *m_tool;
00143     KNoteEdit     *m_editor;
00144     
00145     KNoteConfig   *m_config;
00146     KCal::Journal *m_journal;
00147     
00148     KFind         *m_find;
00149     KMenu         *m_menu;
00150     
00151     KToggleAction *m_readOnly;
00152     
00153 #ifdef Q_WS_X11
00154     KSelectAction   *m_toDesktop;
00155 #endif
00156     KToggleAction *m_keepAbove;
00157     KToggleAction *m_keepBelow;
00158     
00159     KSharedConfig::Ptr m_kwinConf;
00160 };
00161 
00162 #endif

knotes

Skip menu "knotes"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim 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