KTfxWidget Class

# KTfxWidget Class Reference

[TFMXcess Index] [TFMXcess Hierarchy]

Core class to control TFMX-PLAY via KTfxControlData More...

`#include <KTfxWidget.h>`

Inherits: KTfxControlData

## Public Members

- KTfxWidget (QWidget* parent = NULL, const char* name = NULL )
- virtual ~KTfxWidget ()
- void closeEvent (QCloseEvent*)
- void signalHelperINT ()

## Protected Members

- int freq; // frequency (44/32/22/16/11 kHz)
- QString tfmxFile; // filename of the tfmx song (mdat.)
- QString tipFileBar
- QString tipSongLcd
- QString tipFreqLcd
- QString tipBitLcd
- QString tipPlayButton
- QString tipStopButton
- QString tipOpenButton
- QString tipQuitButton
- QString tipUpButton
- QString tipDownButton
- QString tipEightButton
- QString tipSixteenButton
- QString tipHiButton
- QString tipLoButton
- QString tipHelpButton
- QString tipAboutButton
- QString tipToolTipCheck
- QString tipMonoButton
- QString tipHeadphonesButton
- QString tipStereoButton
- QString tipOversampling
- void tipOn ()
- void tipOff ()
- void updateLcd ()
- void playCore ()
- void stopCore ()
- void readConfig ()
- void saveConfig ()
- void checkTfx ()
- void accInit ()
- void buttonInit ()
- void initParanoia ()
- void evalComm ()
- void initPreload ()
- void setupDropzone ()
- void i18nInitBulk ()

## Protected Slots

- void toggleOversampling ()
- void toggleOsampButton ()
- void done (KProcess*)
- void quitTfx ()
- void openTfx (QString myFile)
- void openTfx ()
- void stopTfx ()
- void playTfx ()
- void songUp ()
- void songDown ()
- void freqUp ()
- void freqDown ()
- void bitsHi ()
- void bitsLo ()
- void setStereo ()
- void setHeadphones ()
- void setMono ()
- void toggleTip ()
- void toggleCheckTip ()
- void addTipBulk ()
- void removeTipBulk ()
- void help ()
- void about ()
- void dropAction (KDNDDropZone *dz)
- QString samplePath (QString mdatPath)

## Detailed Description

This class adds some real functionality to KTfxControlData.

It contains all the slots and other functions necessary to to control TFMX-PLAY via the widgets provided by KTfxControlData.

## void closeEvent(QCloseEvent*)

make sure application is closed when top widget is closed

## void signalHelperINT()

helper for the SIGINT handler

## void tipOn()

This turns on tooltips and unchecks the checkbox.

See Also:
  tipOff toggleCheckTip addTipBulk

## void tipOff()

This turns off tooltips and unchecks the checkbox.

See Also:
  tipOn toggleCheckTip removeTipBulk

## void updateLcd()

This updated the three LCDs.

See Also:
  playCore

## void playCore()

This sets the song, tfmxFile, freq, bits, etc., updates the display and, if /dev/dsp is free, invokes TFMX-PLAY.

See Also:
  updateLcd

## void stopCore()

This stops the player, neccessary display updates are also made.

See Also:
  stopTfx

## void readConfig()

This reads the configuration, determines whether to show the splash-screen, sets up preloading of song from previous session

See Also:
  saveConfig

## void saveConfig()

This saves the configuration.

See Also:
  readConfig

## void checkTfx()

Check if tfmx-play can be executed, exit with error message otherwise. This method does the i18n init for the error box on its own!

See Also:
  i18nInitBulk

## void accInit()

This creates an accelerator and adds all the keyboard shortcuts.

See Also:
  buttonInit

## void buttonInit()

This connects all the buttons to the various slots.

See Also:
  buttonInit

## void initParanoia()

This sets all the initial defaults for the player, just to be safe...

See Also:
  buttonInit

## void evalComm()

This evaluates the command-line arguments and, if valid, overrides the current tfmxFile || ( tfmxFile && song ) settings.

See Also:
  initPreload

## void initPreload()

This updates the display and starts the player, if a song is preloaded via the config file or command-line argument.

See Also:
  readConfig evalComm

## void setupDropzone()

Set up the drop zone for drag-and-drop

See Also:
  KTfxControlData#dropAction

## void i18nInitBulk()

Here we initialize most of the translations for buttons, tooltips, message-boxes, etc.

See Also:
  checkTfx

## void toggleOversampling()

Toggle oversampling on/off.

## void toggleOsampButton()

Toggle oversampling and button on/off.

## void done(KProcess*)

Called to cleanup the KShellProcess after the player has been stopped, by means of the stop button, for example.

## void quitTfx()

This slot stops the player, then quits the application.

See Also:
  KTfxControlData stopTfx

## void openTfx(QString myFile)

This slot opens a KFileDialog to get a new tfmxFile to play, if myFile is 0. Otherwise, the path given in myFile is used instead. Valid selections are played, config is saved.

Parameters:

  myFile | is the path to the file to be opened.

See Also:
  KTfxControlData playTfx

## void openTfx()

Overloaded w/o paramter.

## void stopTfx()

This slot stops the player, then saves the config.

See Also:
  KTfxControlData playTfx saveConfig stopCore

## void playTfx()

This slot plays the current file, otherwise openTfx is called to get a file. Config is saved.

See Also:
  KTfxControlData openTfx playCore saveConfig

## void songUp()

This slot increases song num. and calls stopTfx and playTfx if necessary. Config is saved.

See Also:
  KTfxControlData songDown playTfx stopTfx saveConfig

## void songDown()

This slot decreases song num. and calls stopTfx and playTfx if necessary. Config is saved.

See Also:
  KTfxControlData songUp playTfx stopTfx saveConfig

## void freqUp()

This slot increases freq and calls stopTfx and playTfx if necessary. Config is saved.

See Also:
  KTfxControlData freqDown playTfx stopTfx saveConfig

## void freqDown()

This slot decreases freq and calls stopTfx and playTfx if necessary. Config is saved.

See Also:
  KTfxControlData freqUp playTfx stopTfx saveConfig

## void bitsHi()

This slot switches to 16 bits and calls stopTfx and playTfx if necessary. Config is saved.

See Also:
  KTfxControlData bitsLo playTfx stopTfx saveConfig

## void bitsLo()

This slot switches to 8 bits and calls stopTfx and playTfx if necessary. Config is saved.

See Also:
  KTfxControlData bitsHi playTfx stopTfx saveConfig

## void setStereo()

Set stereo output mode, stop/restart/save config works as usual.

See Also:
  setMono setHeadphones playTfx stopTfx saveConfig

## void setHeadphones()

Set headphone output mode, stop/restart/save config works as usual. If you want to use headphones with a stereo soundcard, this mode usually sounds better than reguar stereo.

See Also:
  setStereo setMono playTfx stopTfx saveConfig

## void setMono()

Set mono output mode, stop/restart/save config works as usual.

See Also:
  setHeadphones setStereo playTfx stopTfx saveConfig

## void toggleTip()

This slot toggles tooltips on/off, depending on current status of the checkbox. Config is saved.

See Also:
  KTfxControlData toggleCheckTip tipOff tipOn saveConfig addTipBulk removeTipBulk

## void toggleCheckTip()

This slot turns tooltips off if are on and vice versa. The checkbox is (un)checked, config is saved.

See Also:
  KTfxControlData toggleTip tipOff tipOn saveConfig

## void addTipBulk()

This does the real work of adding all the tooltips, nothing else.

## void removeTipBulk()

This does the real work of removing all the tooltips, nothing else.

## void help()

This slot invokes the HTML online help.

See Also:
  KTfxControlData about

## void about()

This slot shows the "about" box. I just couldn't resist putting the new application into the about box, it's just too "kawaii"!

See Also:
  KTfxControlData help

## void dropAction(KDNDDropZone *dz)

DND slot, activated when something is dropped on the dropzone.

Parameters:

  dz | the dropzone that activated this slot

See Also:
  setupDropzone

## QString samplePath(QString mdatPath)

Returns path of smpl.-file for given mdat.-filepath, if smpl.-file exists. Returns 0 otherwise.

Parameters:

  mdatPath | a string containing the path of the mdat. file

Author: David Banz Version: 2.7 Documentation generated by neo@san on Mon May 1 11:29:54 MEST 2000 | K doc