• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kfile
 

kio/kfile

  • kio
  • kfile
kfilemetainfowidget.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001,2002 Rolf Magnus <ramagnus@kde.org>
3 
4  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 
20 #ifndef __KFILEMETAINFOWIDGET_H__
21 #define __KFILEMETAINFOWIDGET_H__
22 
23 #include <tqwidget.h>
24 #include <tqvariant.h>
25 #include <kfilemetainfo.h>
26 
30 class KIO_EXPORT KFileMetaInfoWidget: public TQWidget
31 {
32  Q_OBJECT
33 public:
34  enum Mode
35  {
36  ReadOnly = 1,
37  ReadWrite = 0,
38  Reserve = 0xff
39  };
40 
41  KFileMetaInfoWidget(KFileMetaInfoItem item, TQValidator* val = 0,
42  TQWidget* parent = 0, const char* name = 0);
43 
44  KFileMetaInfoWidget(KFileMetaInfoItem item, Mode mode, TQValidator* val = 0,
45  TQWidget* parent = 0, const char* name = 0);
46 
47  virtual ~KFileMetaInfoWidget();
48 
49  bool apply()
50  {
51  return m_item.isEditable() && m_item.setValue(m_value);
52  }
53 
54  void setValue(const TQVariant& value) { m_value = value; }
55  TQVariant value()const { return m_value; }
56  TQValidator* validator() const { return m_validator; }
57  KFileMetaInfoItem item()const { return m_item; }
58 
59 signals:
60  void valueChanged(const TQVariant& value);
61 
62 protected:
63  void reparentValidator(TQWidget *widget, TQValidator *validator);
64  virtual TQWidget* makeWidget();
65 
66  TQWidget* makeBoolWidget();
67  TQWidget* makeIntWidget();
68  TQWidget* makeDoubleWidget();
69  TQWidget* makeStringWidget();
70  TQWidget* makeDateWidget();
71  TQWidget* makeTimeWidget();
72  TQWidget* makeDateTimeWidget();
73 
74 private slots:
75  void slotChanged(bool value);
76  void slotChanged(int value);
77  void slotChanged(double value);
78  void slotComboChanged(const TQString &value);
79  void slotLineEditChanged(const TQString& value);
80  void slotMultiLineEditChanged();
81  void slotDateChanged(const TQDate& value);
82  void slotTimeChanged(const TQTime& value);
83  void slotDateTimeChanged(const TQDateTime& value);
84 
85 private:
86  void init(KFileMetaInfoItem item, Mode mode);
87 
88  TQVariant m_value; // the value will be saved here until apply() is called
89  KFileMetaInfoItem m_item;
90  TQWidget* m_widget;
91  TQValidator* m_validator;
92  bool m_dirty : 1;
93 };
94 
95 #endif

kio/kfile

Skip menu "kio/kfile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kio/kfile

Skip menu "kio/kfile"
  • 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 kio/kfile by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |