|
MoleQueue 0.9.0
|
#include <molequeue/jobactionfactory.h>
Public Types | |
| enum | Flag { ContextItem = 0x1 } |
Public Member Functions | |
| JobActionFactory (const JobActionFactory &other) | |
| JobActionFactory & | operator= (const JobActionFactory &other) |
| virtual void | readSettings (QSettings &settings) |
| virtual void | writeSettings (QSettings &settings) const |
| void | setServer (Server *s) |
| Server * | server () const |
| virtual QString | name () const =0 |
| virtual void | clearJobs () |
| virtual bool | isMultiJob () const |
| virtual bool | addJobIfValid (const Job &job) |
| virtual bool | isValidForJob (const Job &job) const =0 |
| virtual bool | useMenu () const |
| virtual QString | menuText () const |
| virtual bool | hasValidActions () const |
| virtual QList< QAction * > | createActions ()=0 |
| virtual unsigned int | usefulness () const =0 |
| virtual Flags | flags () const |
| virtual void | setFlags (Flags f) |
Protected Attributes | |
| unsigned int | m_attemptedJobAdditions |
| bool | m_isMultiJob |
| Server * | m_server |
| QList< Job > | m_jobs |
| Flags | m_flags |
Base class for implementing a factory which creates QActions that operate on Job instances.
| enum Flag |
|
virtual |
Reimplemented in OpenWithActionFactory.
|
virtual |
Reimplemented in OpenWithActionFactory.
| void setServer | ( | Server * | s | ) |
Set the Server instance. Called in ActionFactoryManager::addFactory().
|
pure virtual |
A name that uniquely identifies this factory.
Implemented in KillJobActionFactory, OpenDirectoryActionFactory, OpenWithActionFactory, RemoveJobActionFactory, and ViewJobLogActionFactory.
|
virtual |
Clear m_jobs and reset m_attemptedJobAdditions
Reimplemented in OpenWithActionFactory.
|
virtual |
|
virtual |
Increment m_attemptedJobAdditions and check if the factory's actions are appropriate for the Job @job by calling isValidForJob. If so, job is added to m_jobs.
|
pure virtual |
Implemented in KillJobActionFactory, OpenDirectoryActionFactory, OpenWithActionFactory, RemoveJobActionFactory, and ViewJobLogActionFactory.
|
virtual |
Reimplemented in OpenWithActionFactory.
|
virtual |
Reimplemented in OpenWithActionFactory.
|
virtual |
|
pure virtual |
Create actions that operate on the Job objects in m_jobs. The caller is responsible for managing the lifetime of the actions (passing them to a QMenu or similar is usually sufficient).
Implemented in KillJobActionFactory, OpenDirectoryActionFactory, OpenWithActionFactory, RemoveJobActionFactory, and ViewJobLogActionFactory.
|
pure virtual |
The "usefulness" of the actions produced by this factory, used to order actions in generated menus, etc. Lower value means higher usefulness.
Implemented in KillJobActionFactory, OpenDirectoryActionFactory, OpenWithActionFactory, RemoveJobActionFactory, and ViewJobLogActionFactory.
|
virtual |
|
virtual |