hydrogen 1.1.1
ShotList Class Reference

Shot List. More...

#include <ShotList.h>

Inheritance diagram for ShotList:

Data Structures

class  Arg
 Buffer for construction of Q_ARGs. More...
 

Public Slots

void nextShot (void)
 

Public Member Functions

 ShotList (QStringList shots)
 
 ShotList (QString sShotsFilename)
 
void shoot ()
 

Private Member Functions

void shoot (QString s)
 

Static Private Member Functions

static QWidget * findWidgetInheriting (QObject *pObject, QString &sName)
 Find a widget which inherits the named class. More...
 
static QWidget * findWidget (QString &sName)
 Find a widget by name. More...
 

Private Attributes

QStringList m_shots
 
int m_nNextShot
 

Detailed Description

Shot List.

Utility for grabbing screenshots of widgets. Not a script, just a shot list.

Commands are word-oriented

  • grab <WidgetName|WidgetClass> – grab widget named "WidgetName" or of any class inheriting from "WidgetClass"
    • [ size <w> <h> ] – size of area to grab. 0 or (-)ve mean widget's entire width or height
    • [ ofset <x> <y> ] – offset from the widget's origin for beginning of grab
    • [ as <filename> ] – filename to save as, including file type extension
  • slot <widget> <slot> [<arg>...] – invoke a slot method on widget.
  • dump – dump object tree(s)
  • # <text> – commentary (note that the space is needed!)
  • fin – quit Hydrogen

By naming widgets appropriately and exposing their functionality as slots, it should be possible for the application to allow a lot of flexibility in how screenshots are set up in shot lists.

Constructor & Destructor Documentation

◆ ShotList() [1/2]

ShotList ( QStringList  shots)
inline

◆ ShotList() [2/2]

ShotList ( QString  sShotsFilename)

Member Function Documentation

◆ findWidget()

QWidget * findWidget ( QString &  sName)
staticprivate

Find a widget by name.

◆ findWidgetInheriting()

QWidget * findWidgetInheriting ( QObject *  pObject,
QString &  sName 
)
staticprivate

Find a widget which inherits the named class.

◆ nextShot

void nextShot ( void  )
slot

◆ shoot() [1/2]

void shoot ( )

◆ shoot() [2/2]

void shoot ( QString  s)
private

Field Documentation

◆ m_nNextShot

int m_nNextShot
private

◆ m_shots

QStringList m_shots
private