• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • tools
  • osm-sisyphus
job.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2011 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #ifndef JOB_H
12 #define JOB_H
13 
14 #include "jobparameters.h"
15 #include "region.h"
16 
17 #include <QObject>
18 #include <QRunnable>
19 #include <QFileInfo>
20 
21 class Job : public QObject, public QRunnable
22 {
23  Q_OBJECT
24 public:
25  enum Status {
26  Waiting,
27  Downloading,
28  Routing,
29  Search,
30  Packaging,
31  Uploading,
32  Finished,
33  Error
34  };
35 
36  explicit Job(const Region &region, const JobParameters &parameters, QObject *parent = 0);
37 
38  Status status() const;
39 
40  QString statusMessage() const;
41 
42  Region region() const;
43 
44  void setTransport(const QString &transport);
45 
46  QString transport() const;
47 
48  void setProfile(const QString &profile);
49 
50  void setMonavSettings(const QString &filename);
51 
52  bool operator==(const Job &other) const;
53 
54  virtual void run();
55 
56 Q_SIGNALS:
57  void finished(Job* job);
58 
59 private:
60  void changeStatus(Status status, const QString &message);
61 
62  bool download();
63 
64  bool monav();
65 
66  bool search();
67 
68  bool package();
69 
70  bool upload();
71 
72  bool cleanup();
73 
74  QFileInfo osmFile();
75 
76  QFileInfo monavDir();
77 
78  QFileInfo targetFile();
79 
80  QFileInfo searchFile();
81 
82  Status m_status;
83 
84  Region m_region;
85 
86  JobParameters m_parameters;
87 
88  QString m_statusMessage;
89 
90  QString m_transport;
91 
92  QString m_profile;
93 
94  QString m_monavSettings;
95 };
96 
97 #endif // JOB_H
Job::setTransport
void setTransport(const QString &transport)
Definition: job.cpp:40
Job::Finished
Definition: job.h:32
Job::Downloading
Definition: job.h:27
Job::Status
Status
Definition: job.h:25
Job::setProfile
void setProfile(const QString &profile)
Definition: job.cpp:50
Job::setMonavSettings
void setMonavSettings(const QString &filename)
Definition: job.cpp:55
Job::Waiting
Definition: job.h:26
search
Definition: google-search.qml:12
Job::transport
QString transport() const
Definition: job.cpp:45
Job
Definition: job.h:21
Job::finished
void finished(Job *job)
QObject
Job::status
Status status() const
Definition: job.cpp:25
Region
Definition: region.h:18
Job::run
virtual void run()
Definition: job.cpp:65
Job::Uploading
Definition: job.h:31
Job::Packaging
Definition: job.h:30
Job::Search
Definition: job.h:29
JobParameters
Definition: jobparameters.h:16
Job::Routing
Definition: job.h:28
jobparameters.h
Job::statusMessage
QString statusMessage() const
Definition: job.cpp:30
region.h
Job::region
Region region() const
Definition: job.cpp:35
Job::Job
Job(const Region &region, const JobParameters &parameters, QObject *parent=0)
Definition: job.cpp:19
Job::Error
Definition: job.h:33
Job::operator==
bool operator==(const Job &other) const
Definition: job.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal