Q4Wine  2.0
Q4Wine is a Qt GUI for Wine.
Public Member Functions | Static Public Member Functions | List of all members
q4wine::lib::WineApplication Class Reference

Describes a wine application configuration. More...

#include <wineapplication.hpp>

Inheritance diagram for q4wine::lib::WineApplication:
q4wine::lib::DBObject

Public Member Functions

 WineApplication ()
 
 WineApplication (std::string name, std::string path, std::string args, std::string workDirectory, std::string iconName=std::string(), std::string description=std::string(), std::string overrideDlls=std::string(), std::string wineDebug=std::string(), std::string virtualDesktop=std::string(), std::string lang=std::string(), bool useTerminal=false, std::string display=std::string(), intptr_t priority=0, std::string preRunScript=std::string(), std::string postRunScript=std::string(), uintptr_t prefixId=0, uintptr_t dirId=0, uintptr_t id=0)
 
 ~WineApplication ()
 
virtual bool save (void)
 
const std::string getNiceCmd (void) const
 Construct nice command. More...
 
const std::string getEnvVariables () const
 
void setName (std::string name)
 
void setPath (std::string path)
 
void setArgs (std::string args)
 
void setWorkDirectory (std::string workDirectory)
 
void setIconName (std::string iconName)
 
void setDescription (std::string description)
 
void setOverrideDlls (std::string overrideDlls)
 
void setWineDebug (std::string wineDebug)
 
void setVirtualDesktop (std::string virtualDesktop)
 
void setLang (std::string lang)
 
void setUseTerminal (bool useTerminal)
 
void setDisplay (std::string display)
 
void setPriority (intptr_t priority)
 
void setPreRunScript (std::string preRunScript)
 
void setPostRunScript (std::string postRunScript)
 
void setPrefixId (uintptr_t prefixId)
 
void setDirId (uintptr_t dirId)
 
const std::string getName (void) const
 
const std::string getPath (void) const
 
const std::string getArgs (void) const
 
const std::string getWorkDirectory (void) const
 
const std::string getIconName (void) const
 
const std::string getDescription (void) const
 
const std::string getOverrideDlls (void) const
 
const std::string getWineDebug (void) const
 
const std::string formatVirtualDesktop (void) const
 
const std::string getVirtualDesktop (void) const
 
const std::string getLang (void) const
 
bool getUseTerminal (void) const
 
const std::string getDisplay (void) const
 
intptr_t getPriority (void) const
 
const std::string getPreRunScript (void) const
 
const std::string getPostRunScript (void) const
 
uintptr_t getPrefixId (void) const
 
uintptr_t getDirId (void) const
 
- Public Member Functions inherited from q4wine::lib::DBObject
 DBObject (std::string tableName, intptr_t id=0)
 
virtual ~DBObject ()
 
void setId (intptr_t id)
 
intptr_t getId (void) const
 

Static Public Member Functions

static WineApplicationgetInstance (intptr_t id)
 Create WineApplication object from DB by version.id. More...
 

Additional Inherited Members

- Protected Attributes inherited from q4wine::lib::DBObject
DBEnginedb_
 
std::string tableName_
 
intptr_t id_
 

Detailed Description

<q4wine/src/lib/wineapplication.hpp>

Wine Terms

In terms of Wine, application is a DOS, Windows 3.x, Win32 or Win64 executable (on 64-bit systems).

The program name may be specified in DOS format (C:\WINDOWS\SOL.EXE) or in Unix format (/msdos/windows/sol.exe). You may pass arguments to the program being executed by adding them to the end of the command line invoking wine (such as: wine notepad C:\TEMP\README.TXT). Note that you need to '\' escape special characters (and spaces) when invoking Wine via a shell, e.g: wine C:\Program\ Files\MyPrg\test.exe

It can also be one of the Windows executables shipped with Wine, in which case specifying the full path is not mandatory, e.g. wine explorer or wine notepad.

Q4Wine Terms

In terms of Q4Wine WineApplication is a set of options which describe addtional system and wine specific parameters to be used to execute the application: such as nice prority, desktop size e.t.c.

Author
Alexey S. Malakhov breze.nosp@m.rk@g.nosp@m.mail..nosp@m.com

Constructor & Destructor Documentation

q4wine::lib::WineApplication::WineApplication ( )

Constructs an empty WineApplication object.

q4wine::lib::WineApplication::WineApplication ( std::string  name,
std::string  path,
std::string  args,
std::string  workDirectory,
std::string  iconName = std::string(),
std::string  description = std::string(),
std::string  overrideDlls = std::string(),
std::string  wineDebug = std::string(),
std::string  virtualDesktop = std::string(),
std::string  lang = std::string(),
bool  useTerminal = false,
std::string  display = std::string(),
intptr_t  priority = 0,
std::string  preRunScript = std::string(),
std::string  postRunScript = std::string(),
uintptr_t  prefixId = 0,
uintptr_t  dirId = 0,
uintptr_t  id = 0 
)

Constructs an WineApplication object.

Parameters
nameIs user defined name, should be unique. See also: setName getName
pathThe program name may be specified in DOS or Unix formats. See also: setPath getPath
argsThe programm arguments. See alse: setArgs getArgs
workDirectoryThe name of the directory where app store its data. See also: setWorkDirectory setWorkDirectory
iconNameThe name of the pixmap icon to be used to display application icon. See also: setIconName getIconName
descriptionAn user defined application description. See also: setDescription getDescription
overrideDllsDefines the override type and load order of dlls used in the loading process for any dll. There are currently two types of libraries that can be loaded into a process address space: native windows dlls (native) and Wine internal dlls (builtin). The type may be abbreviated with the first letter of the type (n or b). The library may also be disabled (''). Each sequence of orders must be separated by commas.

Each dll may have its own specific load order. The load order determines which version of the dll is attempted to be loaded into the address space. If the first fails, then the next is tried and so on. Multiple libraries with the same load order can be separated with commas. It is also possible to use specify different loadorders for different libraries by separating the entries by ";"

This optin will be converted into env variable WINEDLLOVERRIDES during application execution. See also: setOverrideDlls getOverrideDlls

Parameters
wineDebugTurns debugging messages on or off. The syntax of the variable is of the form [class][+|-]channel[,[class2][+|-]channel2] See also: setWineDebug getWineDebug

This optin will be converted into env variable WINEDEBUG during application execution. See alse: setWineDebug getWineDebug

Parameters
virtualDesktopThe virtual desktop size. If set, wine will emulate a virtual desktop. In this case, all programs will run in a separate window. See also: setVirtualDesktop getVirtualDesktop
langThe lanvuage to use. Usefill if app requre language differ then the system one. See also: setLang getLang
useTerminalIf set, then application will be executed using user-defined terminal application instead of q4wine-helper. See also: setUseTerminal getUseTerminal
displaySpecifies the X11 display to use. See also: setDisplay getDisplay
priorityRun a program with modified scheduling priority. Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process). See also: setPriority getPriority
preRunScriptSee also: setPreRunScript getPreRunScript
postRunScriptSee also: setPostRunScript getPostRunScript
prefixIdThe associated row id for WinePrefix object. If it set to 0, then the object is not associated with any database record. See also: setPrefixId getPrefixId
dirIdThe associated row id for WineApplication object. If it set to 0, then the object is not associated with any database record. See also: setDirId getDirId
idThe associated row id. If it set to 0, then the object is not associated with any database record. See also: DBObject::setId DBObject::getId
q4wine::lib::WineApplication::~WineApplication ( )

Destroys this WineApplication object.

Member Function Documentation

const std::string q4wine::lib::WineApplication::formatVirtualDesktop ( void  ) const
const std::string q4wine::lib::WineApplication::getArgs ( void  ) const
const std::string q4wine::lib::WineApplication::getDescription ( void  ) const
uintptr_t q4wine::lib::WineApplication::getDirId ( void  ) const
const std::string q4wine::lib::WineApplication::getDisplay ( void  ) const
const std::string q4wine::lib::WineApplication::getEnvVariables ( ) const

Constructs wine env variables (LANG, DISPLAY, WINEDLLOVERRIDES WINEDEBUG) using WineApplication data.

Example: LANG='uk_UA.UTF8' DISPLAY=':0' WINEDLLOVERRIDES='comdlg32,shell32=n;c:\foo\bar\baz=b' WINEDEBUG='fixme-all,warn+cursor,+relay'

Returns
Formatted env variables.
const std::string q4wine::lib::WineApplication::getIconName ( void  ) const
WineApplication * q4wine::lib::WineApplication::getInstance ( intptr_t  id)
static
Parameters
idRecord id.
Returns
WineApplication object or NULL if not found.
const std::string q4wine::lib::WineApplication::getLang ( void  ) const
const std::string q4wine::lib::WineApplication::getName ( void  ) const
const std::string q4wine::lib::WineApplication::getNiceCmd ( void  ) const
Returns
Nice command if priority_ !=0. Empty string otherwice.
const std::string q4wine::lib::WineApplication::getOverrideDlls ( void  ) const
const std::string q4wine::lib::WineApplication::getPath ( void  ) const
const std::string q4wine::lib::WineApplication::getPostRunScript ( void  ) const
uintptr_t q4wine::lib::WineApplication::getPrefixId ( void  ) const
const std::string q4wine::lib::WineApplication::getPreRunScript ( void  ) const
intptr_t q4wine::lib::WineApplication::getPriority ( void  ) const
bool q4wine::lib::WineApplication::getUseTerminal ( void  ) const
const std::string q4wine::lib::WineApplication::getVirtualDesktop ( void  ) const
const std::string q4wine::lib::WineApplication::getWineDebug ( void  ) const
const std::string q4wine::lib::WineApplication::getWorkDirectory ( void  ) const
bool q4wine::lib::WineApplication::save ( void  )
virtual

Implements q4wine::lib::DBObject.

void q4wine::lib::WineApplication::setArgs ( std::string  args)
void q4wine::lib::WineApplication::setDescription ( std::string  description)
void q4wine::lib::WineApplication::setDirId ( uintptr_t  dirId)
void q4wine::lib::WineApplication::setDisplay ( std::string  display)
void q4wine::lib::WineApplication::setIconName ( std::string  iconName)
void q4wine::lib::WineApplication::setLang ( std::string  lang)
void q4wine::lib::WineApplication::setName ( std::string  name)
void q4wine::lib::WineApplication::setOverrideDlls ( std::string  overrideDlls)
void q4wine::lib::WineApplication::setPath ( std::string  path)
void q4wine::lib::WineApplication::setPostRunScript ( std::string  postRunScript)
void q4wine::lib::WineApplication::setPrefixId ( uintptr_t  prefixId)
void q4wine::lib::WineApplication::setPreRunScript ( std::string  preRunScript)
void q4wine::lib::WineApplication::setPriority ( intptr_t  priority)
void q4wine::lib::WineApplication::setUseTerminal ( bool  useTerminal)
void q4wine::lib::WineApplication::setVirtualDesktop ( std::string  virtualDesktop)
void q4wine::lib::WineApplication::setWineDebug ( std::string  wineDebug)
void q4wine::lib::WineApplication::setWorkDirectory ( std::string  workDirectory)

The documentation for this class was generated from the following files: