• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. The KDE Frameworks
  3. KDELibs4Support
  • KDE Home
  • Contact Us

Quick Links

Skip menu "KDELibs4Support"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • File Members
  • Modules
  • Dependencies
  • Related Pages

Class Picker

About

Porting aid from KDELibs4

Maintainer
The KDE Community
Supported platforms
FreeBSD, Linux, MacOSX, Windows
Community
IRC: #kde-devel on Freenode
Mailing list: kde-frameworks-devel
Clone
git clone git://anongit.kde.org/kdelibs4support.git
Browse source
KDELibs4Support on cgit.kde.org

KDELibs4Support

  • frameworks
  • frameworks
  • kdelibs4support
  • src
  • kdecore
ksavefile.h
1 /*
2  This file is part of the KDE libraries
3  Copyright 1999 Waldo Bastian <[email protected]>
4  Copyright 2006 Jaison Lee <[email protected]>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KSAVEFILE_H
22 #define KSAVEFILE_H
23 
24 #include <kdelibs4support_export.h>
25 
26 #include "kbackup.h"
27 
28 #include <QFile>
29 #include <QString>
30 
98 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KSaveFile : public QFile
99 {
100 public:
104  KSaveFile();
105 
111  KDELIBS4SUPPORT_DEPRECATED explicit KSaveFile(const QString &filename);
112 
119  virtual ~KSaveFile();
120 
127  void setFileName(const QString &filename);
128 
135  QString fileName() const override;
136 
142  QFile::FileError error() const;
143 
150  QString errorString() const;
151 
163  bool open(OpenMode flags = QIODevice::ReadWrite) override;
164 
170  void abort();
171 
177  bool finalize();
178 
203  void setDirectWriteFallback(bool enabled);
204 
211  bool directWriteFallback() const;
212 
213 private:
214  Q_DISABLE_COPY(KSaveFile)
215 
216  class Private;
217  Private *const d;
218 };
219 
220 #endif
QIODevice::errorString
QString errorString() const
QFileDevice::error
FileError error() const
QFile::fileName
virtual QString fileName() const
KSaveFile
Class to allow for atomic file I/O, as well as utility functions.
Definition: ksavefile.h:98
QFile::setFileName
void setFileName(const QString &name)
QFile
QString
QFile::open
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Tue Dec 10 2019 03:16:06 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal