summaryrefslogtreecommitdiffstats
path: root/kommander/widgets/aboutdialog.h
blob: 0d0249a7994d7059e8eb6a26dd3736776675ea65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// C++ Interface: aboutdialog
//
// Description: 
//
//
// Author: Andras Mantia <amantia@kdewebdev.org>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef ABOUTDIALOG_H
#define ABOUTDIALOG_H

#include <qlabel.h>
#include <kommanderwidget.h>

class KAboutApplication;
class KAboutData;

/**
	@author Andras Mantia <amantia@kdewebdev.org>
*/
class AboutDialog : public QLabel, public KommanderWidget
{
  Q_OBJECT
  Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
  Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
  Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
public:
    AboutDialog(QWidget *parent = 0, const char *name = 0);

    ~AboutDialog();

  virtual bool isKommanderWidget() const;
  virtual QString currentState() const;
  virtual bool isFunctionSupported(int function);
  virtual QString handleDCOP(int function, const QStringList& args);
  virtual QString populationText() const;
  virtual void setPopulationText(const QString&);
  virtual QStringList associatedText() const;
  virtual void setAssociatedText(const QStringList&);

public slots:
  virtual void populate();
  virtual void execute();

private:
  void initialize(const QString& appName, const QString &icon, const QString& version, const QString& copyright);  
  void addAuthor(const QString& author, const QString &task, const QString& email, const QString &webAddress);
  void addTranslator(const QString& author, const QString& email);
  void setDescription(const QString& description);
  void setHomepage(const QString &homepage);
  void setBugAddress(const QString &bugAddress);
  void setLicense(const QString &license);

  KAboutData *m_aboutData;
  QString m_version;
  QString m_appName;
  QString m_copyright;
  QString m_icon;
  QString m_bugaddress;
  QStringList m_authors;
  QStringList m_emails;
  QStringList m_tasks;
  QStringList m_addresses;
  QString m_description;
  QString m_homepage;
  QString m_license;
};

#endif