knotes Library API Documentation

knote.h

00001 /******************************************************************* 00002 KNotes -- Notes for the KDE project 00003 00004 Copyright (c) 1997-2004, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 *******************************************************************/ 00020 00021 #ifndef KNOTE_H 00022 #define KNOTE_H 00023 00024 #include <qstring.h> 00025 #include <qevent.h> 00026 #include <qframe.h> 00027 #include <qpoint.h> 00028 #include <qcolor.h> 00029 00030 #include <kxmlguiclient.h> 00031 00032 class QLabel; 00033 00034 class KXMLGUIBuilder; 00035 00036 class KPopupMenu; 00037 class KNoteButton; 00038 class KNoteEdit; 00039 class KNoteConfig; 00040 class KToolBar; 00041 class KListAction; 00042 class KToggleAction; 00043 00044 namespace KCal { 00045 class Journal; 00046 } 00047 00048 00049 class KNote : public QFrame, virtual public KXMLGUIClient 00050 { 00051 Q_OBJECT 00052 public: 00053 KNote( KXMLGUIBuilder *builder, QDomDocument buildDoc, KCal::Journal *journal, 00054 QWidget *parent=0, const char *name=0 ); 00055 ~KNote(); 00056 00057 void saveData(); 00058 void saveConfig() const; 00059 00060 QString noteId() const; 00061 QString name() const; 00062 QString text() const; 00063 00064 void setName( const QString& name ); 00065 void setText( const QString& text ); 00066 00067 void sync( const QString& app ); 00068 bool isNew( const QString& app ) const; 00069 bool isModified( const QString& app ) const; 00070 void toDesktop( int desktop ); 00071 00072 public slots: 00073 void slotKill( bool force = false ); 00074 00075 signals: 00076 void sigRequestNewNote(); 00077 void sigNameChanged(); 00078 void sigDataChanged(); 00079 void sigColorChanged(); 00080 void sigKillNote( KCal::Journal* ); 00081 00082 protected: 00083 virtual void showEvent( QShowEvent* ); 00084 virtual void resizeEvent( QResizeEvent* ); 00085 virtual void closeEvent( QCloseEvent* ); 00086 virtual void keyPressEvent( QKeyEvent* ); 00087 virtual void dropEvent( QDropEvent* ); 00088 virtual void dragEnterEvent( QDragEnterEvent* ); 00089 00090 virtual bool event( QEvent* ); 00091 virtual bool eventFilter( QObject*, QEvent* ); 00092 00093 virtual bool focusNextPrevChild( bool ); 00094 00095 private slots: 00096 void slotRename(); 00097 void slotClose(); 00098 void slotSend(); 00099 void slotMail(); 00100 void slotPrint(); 00101 void slotInsDate(); 00102 void slotPreferences(); 00103 void slotPopupActionToDesktop( int id ); 00104 00105 void slotApplyConfig(); 00106 void slotUpdateKeepAboveBelow(); 00107 void slotUpdateShowInTaskbar(); 00108 void slotUpdateDesktopActions(); 00109 00110 private: 00111 void updateFocus(); 00112 void updateLayout(); 00113 void updateLabelAlignment(); 00114 void setColor( const QColor&, const QColor& ); 00115 00116 private: 00117 QPoint m_pointerOffset; 00118 bool m_dragging; 00119 00120 QLabel *m_label; 00121 KNoteButton *m_button; 00122 KToolBar *m_tool; 00123 KNoteEdit *m_editor; 00124 00125 KNoteConfig *m_config; 00126 KCal::Journal *m_journal; 00127 00128 KPopupMenu *m_menu; 00129 KPopupMenu *m_edit_menu; 00130 00131 KListAction *m_toDesktop; 00132 KToggleAction *m_keepAbove; 00133 KToggleAction *m_keepBelow; 00134 }; 00135 00136 #endif
KDE Logo
This file is part of the documentation for knotes Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 27 12:50:14 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003