Changeset View
Changeset View
Standalone View
Standalone View
src/playlistgenerator/ConstraintSolver.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 39 | public: | |||
---|---|---|---|---|---|
46 | 46 | | |||
47 | Meta::TrackList getSolution() const; | 47 | Meta::TrackList getSolution() const; | ||
48 | bool satisfied() const; | 48 | bool satisfied() const; | ||
49 | int serial() const { return m_serialNumber; } | 49 | int serial() const { return m_serialNumber; } | ||
50 | int iterationCount() const { return m_maxGenerations; } | 50 | int iterationCount() const { return m_maxGenerations; } | ||
51 | 51 | | |||
52 | // overloaded ThreadWeaver::Job functions | 52 | // overloaded ThreadWeaver::Job functions | ||
53 | bool canBeExecuted(); | 53 | bool canBeExecuted(); | ||
54 | bool success() const; | 54 | virtual bool success() const override; | ||
55 | 55 | virtual void requestAbort() override; | |||
56 | public Q_SLOTS: | | |||
57 | void requestAbort(); | | |||
58 | 56 | | |||
59 | Q_SIGNALS: | 57 | Q_SIGNALS: | ||
60 | void readyToRun(); | 58 | void readyToRun(); | ||
61 | void incrementProgress(); | 59 | void incrementProgress(); | ||
62 | void totalSteps( int ); | 60 | void totalSteps( int ); | ||
63 | void endProgressOperation( QObject* ); | 61 | void endProgressOperation( QObject* ); | ||
64 | 62 | | |||
65 | /** This signal is emitted when this job is being processed by a thread. */ | 63 | /** This signal is emitted when this job is being processed by a thread. */ | ||
66 | void started(ThreadWeaver::JobPointer); | 64 | void started(ThreadWeaver::JobPointer); | ||
67 | /** This signal is emitted when the job has been finished (no matter if it succeeded or not). */ | 65 | /** This signal is emitted when the job has been finished (no matter if it succeeded or not). */ | ||
68 | void done(ThreadWeaver::JobPointer); | 66 | void done(ThreadWeaver::JobPointer); | ||
69 | /** This job has failed. | 67 | /** This job has failed. | ||
70 | * This signal is emitted when success() returns false after the job is executed. */ | 68 | * This signal is emitted when success() returns false after the job is executed. */ | ||
71 | void failed(ThreadWeaver::JobPointer); | 69 | void failed(ThreadWeaver::JobPointer); | ||
72 | 70 | | |||
73 | protected: | 71 | protected: | ||
74 | void defaultBegin(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; | 72 | void defaultBegin(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) override; | ||
75 | void defaultEnd(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; | 73 | void defaultEnd(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) override; | ||
76 | void run(ThreadWeaver::JobPointer self = QSharedPointer<ThreadWeaver::Job>(), ThreadWeaver::Thread *thread = 0) Q_DECL_OVERRIDE; // from ThreadWeaver::Job | 74 | void run(ThreadWeaver::JobPointer self = QSharedPointer<ThreadWeaver::Job>(), ThreadWeaver::Thread *thread = 0) override; // from ThreadWeaver::Job | ||
77 | 75 | | |||
78 | private Q_SLOTS: | 76 | private Q_SLOTS: | ||
79 | void receiveQueryMakerData( Meta::TrackList ); | 77 | void receiveQueryMakerData( Meta::TrackList ); | ||
80 | void receiveQueryMakerDone(); | 78 | void receiveQueryMakerDone(); | ||
81 | 79 | | |||
82 | private: | 80 | private: | ||
83 | int m_serialNumber; // a randomly-generated serial number to help with debugging | 81 | int m_serialNumber; // a randomly-generated serial number to help with debugging | ||
84 | double m_satisfactionThreshold; | 82 | double m_satisfactionThreshold; | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |