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 <qevent.h>
00026 #include <qframe.h>
00027 #include <qpoint.h>
00028 #include <qcolor.h>
00029
00030 #include <kconfig.h>
00031 #include <kxmlguiclient.h>
00032
00033 class QLabel;
00034
00035 class KXMLGUIBuilder;
00036
00037 class KPopupMenu;
00038 class KNoteButton;
00039 class KNoteEdit;
00040 class KNoteConfig;
00041 class KToolBar;
00042 class KListAction;
00043 class KToggleAction;
00044
00045 namespace KCal {
00046 class Journal;
00047 }
00048
00049
00050 class KNote : public QFrame, virtual public KXMLGUIClient
00051 {
00052 Q_OBJECT
00053 public:
00054 KNote( QDomDocument buildDoc, KCal::Journal *journal, QWidget *parent = 0,
00055 const char *name = 0 );
00056 ~KNote();
00057
00058 void saveData();
00059 void saveConfig() const;
00060
00061 QString noteId() const;
00062 QString name() const;
00063 QString text() const;
00064
00065 void setName( const QString& name );
00066 void setText( const QString& text );
00067
00068 bool isModified() const;
00069
00070 void sync( const QString& app );
00071 bool isNew( const QString& app ) const;
00072 bool isModified( const QString& app ) const;
00073
00074 public slots:
00075 void slotKill( bool force = false );
00076
00077 signals:
00078 void sigRequestNewNote();
00079 void sigShowNextNote();
00080 void sigNameChanged();
00081 void sigDataChanged();
00082 void sigColorChanged();
00083 void sigKillNote( KCal::Journal* );
00084
00085 protected:
00086 virtual void showEvent( QShowEvent* );
00087 virtual void resizeEvent( QResizeEvent* );
00088 virtual void closeEvent( QCloseEvent* );
00089 virtual void dropEvent( QDropEvent* );
00090 virtual void dragEnterEvent( QDragEnterEvent* );
00091
00092 virtual bool event( QEvent* );
00093 virtual bool eventFilter( QObject*, QEvent* );
00094
00095 virtual bool focusNextPrevChild( bool );
00096
00097 private slots:
00098 void slotRename();
00099 void slotClose();
00100 void slotSend();
00101 void slotMail();
00102 void slotPrint();
00103 void slotSaveAs();
00104 void slotInsDate();
00105 void slotPreferences();
00106 void slotPopupActionToDesktop( int id );
00107
00108 void slotApplyConfig();
00109 void slotUpdateKeepAboveBelow();
00110 void slotUpdateShowInTaskbar();
00111 void slotUpdateDesktopActions();
00112
00113 private:
00114 void updateFocus();
00115 void updateLayout();
00116 void updateLabelAlignment();
00117 void setColor( const QColor&, const QColor& );
00118
00119 void toDesktop( int desktop );
00120
00121 QString toPlainText( const QString& );
00122
00123 private:
00124 QLabel *m_label;
00125 KNoteButton *m_button;
00126 KToolBar *m_tool;
00127 KNoteEdit *m_editor;
00128
00129 KNoteConfig *m_config;
00130 KCal::Journal *m_journal;
00131
00132 KPopupMenu *m_menu;
00133 KPopupMenu *m_edit_menu;
00134
00135 KListAction *m_toDesktop;
00136 KToggleAction *m_keepAbove;
00137 KToggleAction *m_keepBelow;
00138
00139 KSharedConfig::Ptr m_kwinConf;
00140 };
00141
00142 #endif
This file is part of the documentation for knotes Library Version 3.3.2.