kwave  18.07.70
GotoDialog.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  GotoDialog.cpp - dialog for selecting a position
3  -------------------
4  begin : Sat Dec 06 2008
5  copyright : (C) 2008 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "config.h"
19 
20 #include <QPushButton>
21 
22 #include <KHelpClient>
23 
24 #include "GotoDialog.h"
25 
26 //***************************************************************************
28  double sample_rate, sample_index_t signal_length,
29  const QString &help_section)
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 }
49 
50 //***************************************************************************
52 {
53 }
54 
55 //***************************************************************************
57 {
58  if (select_pos) select_pos->setMode(new_mode);
59 }
60 
61 //***************************************************************************
63 {
64  KHelpClient::invokeHelp(m_help_section);
65 }
66 
67 //***************************************************************************
68 //***************************************************************************
virtual ~GotoDialog()
Definition: GotoDialog.cpp:51
quint64 sample_index_t
Definition: Sample.h:28
bool connect(Kwave::StreamObject &source, const char *output, Kwave::StreamObject &sink, const char *input)
Definition: Connect.cpp:48
GotoDialog(QWidget *widget, Mode mode, sample_index_t position, double sample_rate, sample_index_t signal_length, const QString &help_section)
Definition: GotoDialog.cpp:27
QString m_help_section
Definition: GotoDialog.h:85
void setMode(Kwave::SelectTimeWidget::Mode new_mode)
Definition: GotoDialog.cpp:56