kwave
18.07.70
|
#include <MemoryPlugin.h>
Public Member Functions | |
MemoryPlugin (QObject *parent, const QVariantList &args) | |
virtual | ~MemoryPlugin () Q_DECL_OVERRIDE |
virtual void | load (QStringList ¶ms) Q_DECL_OVERRIDE |
virtual QStringList * | setup (QStringList &previous_params) Q_DECL_OVERRIDE |
![]() | |
Plugin (QObject *parent, const QVariantList &args) | |
virtual | ~Plugin () Q_DECL_OVERRIDE |
virtual QString | name () const |
virtual QString | description () const |
virtual QString | progressText () |
virtual bool | canClose () const |
bool | isRunning () const |
bool | shouldStop () const |
virtual void | unload () |
virtual int | start (QStringList ¶ms) |
virtual int | stop () |
virtual void | run (QStringList params) |
Kwave::PluginManager & | manager () const |
Kwave::SignalManager & | signalManager () |
QWidget * | parentWidget () const |
QString | signalName () |
virtual sample_index_t | signalLength () |
virtual double | signalRate () |
virtual const QList< unsigned int > | selectedTracks () |
virtual sample_index_t | selection (QList< unsigned int > *tracks=Q_NULLPTR, sample_index_t *left=Q_NULLPTR, sample_index_t *right=Q_NULLPTR, bool expand_if_empty=false) |
virtual void | selectRange (sample_index_t offset, sample_index_t length) |
virtual void | migrateToActiveContext () |
![]() | |
virtual | ~Runnable () |
Protected Member Functions | |
int | interpreteParameters (QStringList ¶ms) |
void | applySettings () |
![]() | |
int | execute (QStringList ¶ms) |
void | emitCommand (const QString &command) |
void | use () |
void | setPluginManager (Kwave::PluginManager *new_plugin_manager) |
virtual void | run_wrapper (const QVariant ¶ms) Q_DECL_OVERRIDE |
Private Attributes | |
bool | m_physical_limited |
unsigned int | m_physical_limit |
bool | m_virtual_enabled |
bool | m_virtual_limited |
unsigned int | m_virtual_limit |
QString | m_virtual_directory |
unsigned int | m_undo_limit |
Additional Inherited Members | |
![]() | |
virtual void | setProgressDialogEnabled (bool enable) |
virtual void | updateProgress (qreal progress) |
virtual void | cancel () |
virtual void | close () |
void | release () |
![]() | |
void | sigRunning (Kwave::Plugin *plugin) |
void | sigDone (Kwave::Plugin *plugin) |
void | sigClosed (Kwave::Plugin *p) |
void | sigCommand (const QString &command) |
void | setProgressText (const QString &text) |
Setup plugin for Kwave's memory manager.
Definition at line 36 of file MemoryPlugin.h.
Kwave::MemoryPlugin::MemoryPlugin | ( | QObject * | parent, |
const QVariantList & | args | ||
) |
Constructor
parent | reference to our plugin manager |
args | argument list [unused] |
Definition at line 46 of file MemoryPlugin.cpp.
|
virtual |
|
protected |
Applies the current settings by passing them to Kwave's global MemoryManager
Definition at line 125 of file MemoryPlugin.cpp.
References Kwave::MemoryManager::instance(), m_physical_limit, m_physical_limited, m_undo_limit, m_virtual_directory, m_virtual_enabled, m_virtual_limit, m_virtual_limited, Kwave::MemoryManager::setPhysicalLimit(), Kwave::MemoryManager::setSwapDirectory(), Kwave::MemoryManager::setUndoLimit(), and Kwave::MemoryManager::setVirtualLimit().
Referenced by load(), and setup().
|
protected |
Interpretes a given parameter list and sets up internal parameters accordingly.
params | reference to a QStringList with parameters |
Definition at line 65 of file MemoryPlugin.cpp.
References m_physical_limit, m_physical_limited, m_undo_limit, m_virtual_directory, m_virtual_enabled, m_virtual_limit, and m_virtual_limited.
Referenced by load(), and setup().
|
virtual |
Gets called when the plugin is first loaded.
Reimplemented from Kwave::Plugin.
Definition at line 118 of file MemoryPlugin.cpp.
References applySettings(), and interpreteParameters().
|
virtual |
Reimplemented from Kwave::Plugin.
Definition at line 137 of file MemoryPlugin.cpp.
References applySettings(), interpreteParameters(), m_physical_limit, m_physical_limited, m_undo_limit, m_virtual_directory, m_virtual_enabled, m_virtual_limit, m_virtual_limited, Kwave::MemoryDialog::params(), and Kwave::Plugin::parentWidget().
|
private |
Maximum amount of physical memory [MB]. Only of interest if m_physical_limited is set to true, otherwise reflects the user's last setting.
Definition at line 87 of file MemoryPlugin.h.
Referenced by applySettings(), interpreteParameters(), and setup().
|
private |
If true, the physical memory is limited
Definition at line 80 of file MemoryPlugin.h.
Referenced by applySettings(), interpreteParameters(), and setup().
|
private |
Maximum amount of memory [MB] available for undo/redo
Definition at line 112 of file MemoryPlugin.h.
Referenced by applySettings(), interpreteParameters(), and setup().
|
private |
Directory for page files. Default = /tmp
Definition at line 107 of file MemoryPlugin.h.
Referenced by applySettings(), interpreteParameters(), and setup().
|
private |
If true, virtual memory is enabled
Definition at line 90 of file MemoryPlugin.h.
Referenced by applySettings(), interpreteParameters(), and setup().
|
private |
Maximum amount of virtual memory [MB]. Only of interest if m_virtual_enabled and m_virtual_limited are set to true, otherwise reflects the user's last setting.
Definition at line 104 of file MemoryPlugin.h.
Referenced by applySettings(), interpreteParameters(), and setup().
|
private |
If true, virtual memory is limited. Only of interest if m_virtual_enabled is set to true, otherwise reflects the user's last setting.
Definition at line 97 of file MemoryPlugin.h.
Referenced by applySettings(), interpreteParameters(), and setup().