1
//MountManager - the program for easy mounting of storage devices in Linux
2
//Copyright (C) 2007-2008 Tikhonov Sergey
4
//This file is part of MountManager Core
6
//This program is free software; you can redistribute it and/or
7
//modify it under the terms of the GNU General Public License
8
//as published by the Free Software Foundation; either version 2
9
//of the License, or (at your option) any later version.
11
//This program is distributed in the hope that it will be useful,
12
//but WITHOUT ANY WARRANTY; without even the implied warranty of
13
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
//GNU General Public License for more details.
16
//You should have received a copy of the GNU General Public License
17
//along with this program; if not, write to the Free Software
18
//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
#ifndef DISKMOUNTOPTIOcNS_H
20
#define DISKMOUNTOPTIONS_H
22
#include <QXmlDefaultHandler>
23
#include <QXmlParseException>
24
#include <QStringList>
29
// If option is check box
36
QList<Value *> optionValues;
37
QStringList optionComboBoxItems;
38
QString optionDocMark;
39
QString optionDefaultValue;
44
class DiskOptionsParser : public QXmlDefaultHandler
47
QList<Option *> optionsList;
49
Option *currentOption;
54
bool isComboBoxItemsNow;
55
bool areThereComboBoxItems;
56
bool isAcceptComboBoxItems;
57
QString comboBoxItemsLocale;
58
QString optionTitleLocale;
59
QString variantStatus;
65
bool startElement(const QString&, const QString&, const QString&, const QXmlAttributes&);
66
bool characters(const QString& str);
67
bool endElement(const QString&, const QString&, const QString&);
68
bool fatalError(const QXmlParseException&);
70
DiskOptionsParser(QString lang = QString());
74
QList<Option *> options();
76
void setLanguage(const QString& lang);
79
const QString& language() const;