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

kate

  • kate
  • part
katefiletype.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001-2003 Christoph Cullmann <cullmann@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef __kate_filetype_h__
20 #define __kate_filetype_h__
21 
22 #include <tqstringlist.h>
23 #include <tqptrlist.h>
24 #include <tqpopupmenu.h> // for TQPtrList<TQPopupMenu>, compile with gcc 3.4
25 #include <tqguardedptr.h>
26 
27 #include "katedialogs.h"
28 
29 class KateDocument;
30 
31 class KateFileType
32 {
33  public:
34  int number;
35  TQString name;
36  TQString section;
37  TQStringList wildcards;
38  TQStringList mimetypes;
39  int priority;
40  TQString varLine;
41 };
42 
43 class KateFileTypeManager
44 {
45  public:
46  KateFileTypeManager ();
47  ~KateFileTypeManager ();
48 
52  void update ();
53 
54  void save (TQPtrList<KateFileType> *v);
55 
60  int fileType (KateDocument *doc);
61 
65  const KateFileType *fileType (uint number);
66 
70  TQPtrList<KateFileType> *list () { return &m_types; }
71 
72  private:
73  int wildcardsFind (const TQString &fileName);
74 
75  private:
76  TQPtrList<KateFileType> m_types;
77 };
78 
79 class KateFileTypeConfigTab : public KateConfigPage
80 {
81  Q_OBJECT
82 
83  public:
84  KateFileTypeConfigTab( TQWidget *parent );
85 
86  public slots:
87  void apply();
88  void reload();
89  void reset();
90  void defaults();
91 
92  private slots:
93  void update ();
94  void deleteType ();
95  void newType ();
96  void typeChanged (int type);
97  void showMTDlg();
98  void save ();
99 
100  private:
101  class TQGroupBox *gbProps;
102  class TQPushButton *btndel;
103  class TQComboBox *typeCombo;
104  class TQLineEdit *wildcards;
105  class TQLineEdit *mimetypes;
106  class KIntNumInput *priority;
107  class TQLineEdit *name;
108  class TQLineEdit *section;
109  class TQLineEdit *varLine;
110 
111  TQPtrList<KateFileType> m_types;
112  KateFileType *m_lastType;
113 };
114 
115 class KateViewFileTypeAction : public Kate::ActionMenu
116 {
117  Q_OBJECT
118 
119  public:
120  KateViewFileTypeAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
121  : Kate::ActionMenu(text, parent, name) { init(); };
122 
123  ~KateViewFileTypeAction(){;};
124 
125  void updateMenu (Kate::Document *doc);
126 
127  private:
128  void init();
129 
130  TQGuardedPtr<KateDocument> m_doc;
131  TQStringList subMenusName;
132  TQStringList names;
133  TQPtrList<TQPopupMenu> subMenus;
134 
135  public slots:
136  void slotAboutToShow();
137 
138  private slots:
139  void setType (int mode);
140 };
141 
142 #endif
TDEStdAccel::save
const TDEShortcut & save()
Kate::Document
This interface provides access to the Kate Document class.
Definition: document.h:182
TDEStdAccel::name
TQString name(StdAccel id)
Kate
Kate namespace All classes in this namespace must stay BC during one major release series (e...
Definition: document.h:50
TDEStdAccel::reload
const TDEShortcut & reload()
KIntNumInput

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
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for kate by doxygen 1.8.8
This website is maintained by Timothy Pearson.