libyui-qt-pkg
YQPkgDescriptionView.h
1 /**************************************************************************
2 Copyright (C) 2000 - 2010 Novell, Inc.
3 All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program 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
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 
19 **************************************************************************/
20 
21 
22 /*---------------------------------------------------------------------\
23 | |
24 | __ __ ____ _____ ____ |
25 | \ \ / /_ _/ ___|_ _|___ \ |
26 | \ V / _` \___ \ | | __) | |
27 | | | (_| |___) || | / __/ |
28 | |_|\__,_|____/ |_| |_____| |
29 | |
30 | core system |
31 | (C) SuSE GmbH |
32 \----------------------------------------------------------------------/
33 
34  File: YQPkgDescriptionView.h
35 
36  Author: Stefan Hundhammer <shundhammer.de>
37 
38 /-*/
39 
40 
41 #ifndef YQPkgDescriptionView_h
42 #define YQPkgDescriptionView_h
43 
44 #include <QUrl>
45 #include "YQPkgGenericDetailsView.h"
46 
47 using std::list;
48 using std::string;
49 
50 
56 {
57  Q_OBJECT
58 
59 public:
60 
64  YQPkgDescriptionView( QWidget * parent, bool showSupportability = true );
65 
69  virtual ~YQPkgDescriptionView();
70 
76  virtual void showDetails( ZyppSel selectable );
77 
84  virtual void setSource( const QUrl & name );
85 
86 protected:
87 
91  QString simpleHtmlParagraphs( QString text );
92 
97  void showLink( const QUrl & url );
98 
102  QString applicationIconList( const list<string> & fileList ) const;
103 
107  QString findDesktopIcon ( const QString& iconName ) const;
108 
112  QMap<QString, QString> readDesktopFile( const QString & fileName ) const;
113 
117  QStringList findDesktopFiles( const list<string> & fileList ) const;
118 
122  void initLang();
123 
124 private:
125  QString langWithCountry;
126  QString lang;
127  bool _showSupportability;
128 
129 };
130 
131 
132 #endif // ifndef YQPkgDescriptionView_h
Display the description of a ZyppObj derived object along with its name and summary.
Definition: YQPkgDescriptionView.h:55
QMap< QString, QString > readDesktopFile(const QString &fileName) const
Definition: YQPkgDescriptionView.cc:288
QString simpleHtmlParagraphs(QString text)
Definition: YQPkgDescriptionView.cc:167
YQPkgDescriptionView(QWidget *parent, bool showSupportability=true)
Definition: YQPkgDescriptionView.cc:80
virtual void setSource(const QUrl &name)
Definition: YQPkgDescriptionView.cc:236
QString applicationIconList(const list< string > &fileList) const
Definition: YQPkgDescriptionView.cc:243
QStringList findDesktopFiles(const list< string > &fileList) const
Definition: YQPkgDescriptionView.cc:327
Abstract base class for details views. Handles generic stuff like HTML formatting, Qt slots and display only if this view is visible at all ( it may be hidden if it&#39;s part of a QTabWidget ).
Definition: YQPkgGenericDetailsView.h:58
QString findDesktopIcon(const QString &iconName) const
void initLang()
Definition: YQPkgDescriptionView.cc:344
void showLink(const QUrl &url)
Definition: YQPkgDescriptionView.cc:219
virtual ~YQPkgDescriptionView()
Definition: YQPkgDescriptionView.cc:89
virtual void showDetails(ZyppSel selectable)
Definition: YQPkgDescriptionView.cc:96