• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

katefiletype.h
00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2001-2003 Christoph Cullmann <cullmann@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #ifndef __kate_filetype_h__
00020 #define __kate_filetype_h__
00021 
00022 #include <tqstringlist.h>
00023 #include <tqptrlist.h>
00024 #include <tqpopupmenu.h> // for TQPtrList<TQPopupMenu>, compile with gcc 3.4
00025 #include <tqguardedptr.h>
00026 
00027 #include "katedialogs.h"
00028 
00029 class KateDocument;
00030 
00031 class KateFileType
00032 {
00033   public:
00034     int number;
00035     TQString name;
00036     TQString section;
00037     TQStringList wildcards;
00038     TQStringList mimetypes;
00039     int priority;
00040     TQString varLine;
00041 };
00042 
00043 class KateFileTypeManager
00044 {
00045   public:
00046     KateFileTypeManager ();
00047     ~KateFileTypeManager ();
00048 
00052     void update ();
00053 
00054     void save (TQPtrList<KateFileType> *v);
00055 
00060     int fileType (KateDocument *doc);
00061 
00065     const KateFileType *fileType (uint number);
00066 
00070     TQPtrList<KateFileType> *list () { return &m_types; }
00071 
00072   private:
00073     int wildcardsFind (const TQString &fileName);
00074 
00075   private:
00076     TQPtrList<KateFileType> m_types;
00077 };
00078 
00079 class KateFileTypeConfigTab : public KateConfigPage
00080 {
00081   Q_OBJECT
00082 
00083   public:
00084     KateFileTypeConfigTab( TQWidget *parent );
00085 
00086   public slots:
00087     void apply();
00088     void reload();
00089     void reset();
00090     void defaults();
00091 
00092   private slots:
00093     void update ();
00094     void deleteType ();
00095     void newType ();
00096     void typeChanged (int type);
00097     void showMTDlg();
00098     void save ();
00099 
00100   private:
00101     class TQGroupBox *gbProps;
00102     class TQPushButton *btndel;
00103     class TQComboBox *typeCombo;
00104     class TQLineEdit *wildcards;
00105     class TQLineEdit *mimetypes;
00106     class KIntNumInput *priority;
00107     class TQLineEdit *name;
00108     class TQLineEdit *section;
00109     class TQLineEdit *varLine;
00110 
00111     TQPtrList<KateFileType> m_types;
00112     KateFileType *m_lastType;
00113 };
00114 
00115 class KateViewFileTypeAction : public Kate::ActionMenu
00116 {
00117   Q_OBJECT
00118 
00119   public:
00120     KateViewFileTypeAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
00121        : Kate::ActionMenu(text, parent, name) { init(); };
00122 
00123     ~KateViewFileTypeAction(){;};
00124 
00125     void updateMenu (Kate::Document *doc);
00126 
00127   private:
00128     void init();
00129 
00130     TQGuardedPtr<KateDocument> m_doc;
00131     TQStringList subMenusName;
00132     TQStringList names;
00133     TQPtrList<TQPopupMenu> subMenus;
00134 
00135   public  slots:
00136     void slotAboutToShow();
00137 
00138   private slots:
00139     void setType (int mode);
00140 };
00141 
00142 #endif

kate

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

kate

Skip menu "kate"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kate by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |