LibEngsas
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
src
lib
core
internal
emimetype.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2010 - 2012 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
3
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Lesser General Public
6
License as published by the Free Software Foundation; either
7
version 2.1 of the License, or (at your option) any later version.
8
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Lesser General Public License for more details.
13
14
You should have received a copy of the GNU Lesser General Public
15
License along with this library; if not, write to the Free Software
16
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17
MA 02110-1301 USA.
18
*/
19
20
#ifndef EMIMETYPE_H
21
#define EMIMETYPE_H
22
23
#include "
emimemodelitem.h
"
24
25
class
EMimeProgram
;
26
27
#include <QString>
28
#include <QList>
29
#include <QFileInfo>
30
35
class
EMimeType
:
public
EMimeModelItem
36
{
37
public
:
38
EMimeType
( QString newName =
""
);
39
~EMimeType
();
40
41
inline
static
QString
group
(){
return
"MimeTypes"
; };
42
43
void
setName
( QString newName );
47
QString
name
()
const
;
52
void
setSuffix
( QString
suffix
);
53
QString
suffix
()
const
;
58
void
setPrefix
( QString
prefix
);
59
QString
prefix
()
const
;
60
65
void
setDefaultProgram
(
EMimeProgram
*newProgram );
66
void
setDefaultProgram
( QString newProgram );
67
EMimeProgram
*
defaultProgram
()
const
;
68
void
setPossibleProgram
( QString possibleProgram );
69
void
setPossibleProgram
( QFileInfo possibleProgram );
70
void
setPossibleProgram
(
EMimeProgram
*possibleProgram );
71
QList<EMimeProgram*>
possiblePrograms
()
const
;
72
73
int
rowCount
()
const
;
74
75
bool
saveMimeType
();
76
bool
loadMimeType
( QString newName =
""
);
77
78
bool
operator==
(
const
EMimeType
&compareType )
const
;
79
bool
operator!=
(
const
EMimeType
&compareType )
const
;
80
81
private
:
82
QString
myName
;
83
QString
mySuffix
,
myPrefix
;
84
EMimeProgram
*
myDefaultProgram
;
85
QList<EMimeProgram*>
myPossiblePrograms
;
86
};
87
88
#endif // EMIMETYPE_H
Generated by
1.8.1.2