KDELibs4Support

kfilemetainfowidget.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001,2002 Rolf Magnus <[email protected]>
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 <QWidget>
24 #include <QVariant>
25 #include <kfilemetainfo.h>
26 #include <kdelibs4support_export.h>
27 
28 class KFileMetaInfoWidgetPrivate;
29 
34 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KFileMetaInfoWidget: public QWidget
35 {
36  Q_OBJECT
37 public:
38  enum Mode {
39  ReadOnly = 1,
40  ReadWrite = 0,
41  Reserve = 0xff
42  };
43 
44  KDELIBS4SUPPORT_DEPRECATED explicit KFileMetaInfoWidget(KFileMetaInfoItem item,
45  QValidator *val = nullptr,
46  QWidget *parent = nullptr);
47 
48  KFileMetaInfoWidget(KFileMetaInfoItem item, Mode mode, QValidator *val = nullptr,
49  QWidget *parent = nullptr);
50 
51  virtual ~KFileMetaInfoWidget();
52 
53  bool apply();
54 
55  void setValue(const QVariant &value);
56  QVariant value() const;
57  QValidator *validator() const;
58  KFileMetaInfoItem item() const;
59 
60 Q_SIGNALS:
61  void valueChanged(const QVariant &value);
62 
63 protected:
64  void reparentValidator(QWidget *widget, QValidator *validator);
65  virtual QWidget *makeWidget();
66 
67  QWidget *makeBoolWidget();
68  QWidget *makeIntWidget();
69  QWidget *makeDoubleWidget();
70  QWidget *makeStringWidget();
71  QWidget *makeDateWidget();
72  QWidget *makeTimeWidget();
73  QWidget *makeDateTimeWidget();
74 
75 private Q_SLOTS:
76  void slotChanged(bool value);
77  void slotChanged(int value);
78  void slotChanged(double value);
79  void slotComboChanged(const QString &value);
80  void slotLineEditChanged(const QString &value);
81  void slotMultiLineEditChanged();
82  void slotDateChanged(const QDate &value);
83  void slotTimeChanged(const QTime &value);
84  void slotDateTimeChanged(const QDateTime &value);
85 
86 private:
87  friend class KFileMetaInfoWidgetPrivate;
88  KFileMetaInfoWidgetPrivate *const d;
89 
91 };
92 
93 #endif
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 11 2020 22:58:05 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.