knote.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KNOTE_H
00022 #define KNOTE_H
00023
00024 #include <qstring.h>
00025 #include <qframe.h>
00026 #include <qpoint.h>
00027 #include <qcolor.h>
00028
00029 #include <kxmlguiclient.h>
00030
00031 class QLabel;
00032
00033 class KXMLGUIBuilder;
00034 class KXMLGUIFactory;
00035
00036 class KPopupMenu;
00037 class KToggleAction;
00038 class KListAction;
00039 class KNoteButton;
00040 class KNoteEdit;
00041
00042 namespace KCal {
00043 class Journal;
00044 }
00045
00046
00047 class KNote : public QFrame, virtual public KXMLGUIClient
00048 {
00049 Q_OBJECT
00050 public:
00051 KNote( KXMLGUIBuilder *builder, QDomDocument buildDoc, KCal::Journal *journal,
00052 QWidget *parent=0, const char *name=0 );
00053 ~KNote();
00054
00055 void saveData();
00056 void saveConfig() const;
00057
00058 QString noteId() const;
00059 QString name() const;
00060 QString text() const;
00061
00062 void setName( const QString& name );
00063 void setText( const QString& text );
00064
00065 void sync( const QString& app );
00066 bool isNew( const QString& app ) const;
00067 bool isModified( const QString& app ) const;
00068 void toDesktop( int desktop );
00069
00070 public slots:
00071 void slotNewNote();
00072 void slotRename();
00073 void slotClose();
00074 void slotKill( bool force = false );
00075 void slotMail() ;
00076 void slotPrint();
00077 void slotInsDate();
00078 void slotPreferences();
00079
00080 void slotToggleAlwaysOnTop();
00081 void slotPopupActionToDesktop( int id );
00082 void slotUpdateDesktopActions();
00083
00084 signals:
00085 void sigNewNote();
00086 void sigKillNote( KCal::Journal* );
00087 void sigNameChanged();
00088 void sigSaveData();
00089
00090 protected:
00091 virtual void resizeEvent( QResizeEvent* );
00092 virtual void closeEvent( QCloseEvent* );
00093 virtual void keyPressEvent( QKeyEvent* );
00094
00095 virtual bool event( QEvent* );
00096 virtual bool eventFilter( QObject*, QEvent* );
00097
00098 private slots:
00099 void slotApplyConfig();
00100 void slotSkipTaskbar( bool skip );
00101
00102 private:
00103 void updateFocus();
00104 void updateLayout();
00105 void updateLabelAlignment();
00106 void setColor( const QColor&, const QColor& );
00107
00108 QPoint m_pointerOffset;
00109 bool m_dragging;
00110
00111 QLabel *m_label;
00112 KNoteButton *m_button;
00113 KNoteEdit *m_editor;
00114 QWidget *m_tool;
00115
00116 KCal::Journal *m_journal;
00117 QString m_configFile;
00118
00119 public:
00120 KToggleAction *m_alwaysOnTop;
00121 private:
00122 KListAction *m_toDesktop;
00123
00124 KPopupMenu *m_menu;
00125 KPopupMenu *m_edit_menu;
00126
00127 KXMLGUIFactory *factory;
00128 };
00129
00130 #endif
This file is part of the documentation for knotes Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Mar 6 17:18:05 2004 by
doxygen 1.3.6-20040222 written by
Dimitri van Heesch, © 1997-2003