You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.5 KiB
75 lines
2.5 KiB
15 years ago
|
/* This file is part of the KDE libraries
|
||
|
Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
|
||
|
|
||
|
library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License as published by the Free Software Foundation, version 2.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#ifndef KFILEPROPS_H
|
||
|
#define KFILEPROPS_H
|
||
|
|
||
15 years ago
|
#include <tqstring.h>
|
||
15 years ago
|
|
||
12 years ago
|
#include <tdefilemetainfo.h>
|
||
15 years ago
|
|
||
|
class FileProps
|
||
|
{
|
||
|
public:
|
||
15 years ago
|
FileProps( const TQString& path, const TQStringList& suppliedGroups );
|
||
15 years ago
|
virtual ~FileProps();
|
||
|
|
||
|
bool isValid() const;
|
||
|
|
||
15 years ago
|
TQString fileName() const { return m_info->path(); }
|
||
15 years ago
|
|
||
15 years ago
|
TQStringList supportedGroups() const;
|
||
|
TQStringList availableGroups() const;
|
||
|
TQStringList translatedGroups();
|
||
15 years ago
|
|
||
15 years ago
|
const TQStringList& groupsToUse() const { return m_groupsToUse; }
|
||
15 years ago
|
bool userSuppliedGroups() const { return m_userSuppliedGroups; }
|
||
|
|
||
15 years ago
|
TQStringList supportedKeys( const TQString& group ) const;
|
||
|
TQStringList availableKeys( const TQString& group ) const;
|
||
|
TQStringList preferredKeys( const TQString& group ) const;
|
||
15 years ago
|
|
||
15 years ago
|
TQStringList supportedKeys() const { return m_info->supportedKeys(); }
|
||
|
TQStringList preferredKeys() const { return m_info->preferredKeys(); }
|
||
15 years ago
|
|
||
15 years ago
|
TQString getValue( const TQString& group, const TQString& key ) const;
|
||
|
bool setValue( const TQString& group,
|
||
|
const TQString& key, const TQString &value );
|
||
15 years ago
|
|
||
15 years ago
|
TQStringList allValues( const TQString& group ) const;
|
||
|
TQStringList preferredValues( const TQString& group ) const;
|
||
15 years ago
|
|
||
15 years ago
|
bool isReadOnly( const TQString& group, const TQString& key );
|
||
15 years ago
|
|
||
|
private:
|
||
15 years ago
|
static TQString createKeyValue( const KFileMetaInfoGroup& g,
|
||
|
const TQString& key );
|
||
|
static TQStringList createKeyValueList( const KFileMetaInfoGroup&,
|
||
|
const TQStringList& );
|
||
15 years ago
|
bool sync();
|
||
|
|
||
|
KFileMetaInfo *m_info;
|
||
|
bool m_dirty;
|
||
|
bool m_userSuppliedGroups;
|
||
|
|
||
15 years ago
|
TQStringList m_groupsToUse;
|
||
15 years ago
|
|
||
|
};
|
||
|
|
||
|
#endif // KFILEPROPS_H
|