kwave  18.07.70
Kwave::GotoDialog Class Reference

#include <GotoDialog.h>

Inheritance diagram for Kwave::GotoDialog:
Inheritance graph
Collaboration diagram for Kwave::GotoDialog:
Collaboration graph

Public Types

typedef Kwave::SelectTimeWidget::Mode Mode
 

Public Member Functions

 GotoDialog (QWidget *widget, Mode mode, sample_index_t position, double sample_rate, sample_index_t signal_length, const QString &help_section)
 
virtual ~GotoDialog ()
 
Mode mode ()
 
void setMode (Kwave::SelectTimeWidget::Mode new_mode)
 
quint64 pos () const
 

Private Slots

void invokeHelp ()
 

Private Attributes

QString m_help_section
 

Detailed Description

Definition at line 32 of file GotoDialog.h.

Member Typedef Documentation

◆ Mode

shortcut typedef

Definition at line 38 of file GotoDialog.h.

Constructor & Destructor Documentation

◆ GotoDialog()

Kwave::GotoDialog::GotoDialog ( QWidget *  widget,
Mode  mode,
sample_index_t  position,
double  sample_rate,
sample_index_t  signal_length,
const QString &  help_section 
)

Constructor

Parameters
widgetpointer to the parent widget
modeselectionMode for the position, byTime, bySamples, byPercents
positionposition in ms, samples or percent
sample_ratenumber of samples per second, needed for converting between samples and time
signal_lengthlength of the signal in samples, needed for converting samples to percentage
help_sectionsection within the manual

Definition at line 27 of file GotoDialog.cpp.

References Kwave::connect(), and invokeHelp().

30  :QDialog(widget), Ui::GotoDlg(), m_help_section(help_section)
31 {
32  setupUi(this);
33  setModal(true);
34 
35  if (select_pos) {
36  select_pos->init(mode, pos, sample_rate, 0, signal_length);
37  select_pos->setTitle(QString());
38  }
39 
40  setMinimumSize(sizeHint());
41  setFixedSize(sizeHint());
42 
43  connect(buttonBox_Help->button(QDialogButtonBox::Help), SIGNAL(clicked()),
44  this, SLOT(invokeHelp()));
45 
46  // set the focus onto the "OK" button
47  buttonBox->button(QDialogButtonBox::Ok)->setFocus();
48 }
bool connect(Kwave::StreamObject &source, const char *output, Kwave::StreamObject &sink, const char *input)
Definition: Connect.cpp:48
QString m_help_section
Definition: GotoDialog.h:85
quint64 pos() const
Definition: GotoDialog.h:75
Here is the call graph for this function:

◆ ~GotoDialog()

Kwave::GotoDialog::~GotoDialog ( )
virtual

Destructor

Definition at line 51 of file GotoDialog.cpp.

52 {
53 }

Member Function Documentation

◆ invokeHelp

void Kwave::GotoDialog::invokeHelp ( )
privateslot

invoke the online help

Definition at line 62 of file GotoDialog.cpp.

References m_help_section.

Referenced by GotoDialog(), and pos().

63 {
64  KHelpClient::invokeHelp(m_help_section);
65 }
QString m_help_section
Definition: GotoDialog.h:85
Here is the caller graph for this function:

◆ mode()

Mode Kwave::GotoDialog::mode ( )
inline

Returns the current selection mode for the position (byTime, bySamples, byPercents)

Definition at line 64 of file GotoDialog.h.

References Kwave::SelectTimeWidget::bySamples, and setMode().

Referenced by Kwave::GotoPluginBase::setup().

64  {
65  return select_pos ? select_pos->mode() :
67  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pos()

quint64 Kwave::GotoDialog::pos ( ) const
inline

Returns the current position (byTime, bySamples, byPercents)

Definition at line 75 of file GotoDialog.h.

References invokeHelp().

Referenced by Kwave::GotoPluginBase::setup().

75 { return (select_pos) ? select_pos->time() : 0; }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMode()

void Kwave::GotoDialog::setMode ( Kwave::SelectTimeWidget::Mode  new_mode)

Set a new position mode

Definition at line 56 of file GotoDialog.cpp.

Referenced by mode().

57 {
58  if (select_pos) select_pos->setMode(new_mode);
59 }
Here is the caller graph for this function:

Member Data Documentation

◆ m_help_section

QString Kwave::GotoDialog::m_help_section
private

name of the section in the handbook

Definition at line 85 of file GotoDialog.h.

Referenced by invokeHelp().


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