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

Kate

timedate.h

Go to the documentation of this file.
00001 
00020 #ifndef TIMEDATE_H
00021 #define TIMEDATE_H
00022 
00023 #include <ktexteditor/plugin.h>
00024 #include <ktexteditor/view.h>
00025 #include <kxmlguiclient.h>
00026 #include <klocalizedstring.h>
00027 #include <kpluginfactory.h>
00028 
00029 #include <QtCore/QEvent>
00030 #include <QtCore/QObject>
00031 #include <QtCore/QList>
00032 #include <QtCore/QVariantList>
00033 
00034 static QString localizedTimeDate;
00035 
00036 class TimeDatePlugin
00037   : public KTextEditor::Plugin
00038 {
00039   public:
00040     explicit TimeDatePlugin(QObject *parent = 0,
00041                             const QVariantList &args = QVariantList());
00042     virtual ~TimeDatePlugin();
00043 
00044     static TimeDatePlugin *self() { return plugin; }
00045 
00046     void addView (KTextEditor::View *view);
00047     void removeView (KTextEditor::View *view);
00048 
00049     void readConfig();
00050     void writeConfig();
00051 
00052     virtual void readConfig (KConfig *) {}
00053     virtual void writeConfig (KConfig *) {}
00054 
00055     void setFormat(const QString &format);
00056     QString format() const;
00057 
00058   private:
00059     static TimeDatePlugin *plugin;
00060     QList<class TimeDatePluginView*> m_views;
00061     QString m_string;
00062 };
00063 
00064 class TimeDatePluginView
00065    : public QObject, public KXMLGUIClient
00066 {
00067   Q_OBJECT
00068 
00069   public:
00070     explicit TimeDatePluginView(const QString &string,
00071                                 KTextEditor::View *view = 0);
00072     ~TimeDatePluginView();
00073 
00074     void setFormat(const QString &format);
00075     QString format() const;
00076 
00077   private Q_SLOTS:
00078     void slotInsertTimeDate();
00079 
00080   private:
00081     KTextEditor::View *m_view;
00082     QString m_string;
00083 };
00084 
00085 K_PLUGIN_FACTORY_DECLARATION(TimeDatePluginFactory)
00086 
00087 #endif // TIMEDATE_H

Kate

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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