• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kalarm

  • sources
  • kde-4.14
  • kdepim
  • kalarm
messagewin_p.h
Go to the documentation of this file.
1 /*
2  * messagewin_p.h - private declarations for MessageWin
3  * Program: kalarm
4  * Copyright © 2009-2013 by David Jarvie <djarvie@kde.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef MESSAGEWIN_P_H
22 #define MESSAGEWIN_P_H
23 
24 #include <phonon/phononnamespace.h>
25 #include <phonon/path.h>
26 #include <QThread>
27 #include <QMutex>
28 
29 class MessageWin;
30 
31 namespace Phonon { class MediaObject; }
32 
33 class AudioThread : public QThread
34 {
35  Q_OBJECT
36  public:
37  AudioThread(MessageWin* parent, const QString& audioFile, float volume, float fadeVolume, int fadeSeconds, int repeatPause);
38  ~AudioThread();
39  void stop(bool wait = false);
40  QString error() const;
41 
42  static MessageWin* mAudioOwner; // window which owns the unique AudioThread
43 
44  signals:
45  void readyToPlay();
46 
47  protected:
48  virtual void run();
49 
50  private slots:
51  void checkAudioPlay();
52  void playStateChanged(Phonon::State);
53  void stopPlay();
54 
55  private:
56  mutable QMutex mMutex;
57  QString mFile;
58  float mVolume;
59  float mFadeVolume;
60  int mFadeSeconds;
61  int mRepeatPause;
62  Phonon::MediaObject* mAudioObject;
63  Phonon::Path mPath;
64  QString mError;
65  bool mPlayedOnce; // the sound file has started playing at least once
66  bool mPausing; // currently pausing between repeats
67 };
68 
69 #endif // MESSAGEWIN_P_H
70 
71 // vim: et sw=4:
QMutex
AudioThread::readyToPlay
void readyToPlay()
AudioThread::AudioThread
AudioThread(MessageWin *parent, const QString &audioFile, float volume, float fadeVolume, int fadeSeconds, int repeatPause)
Definition: messagewin.cpp:1633
AudioThread::~AudioThread
~AudioThread()
Definition: messagewin.cpp:1651
Phonon::Path
AudioThread::run
virtual void run()
Definition: messagewin.cpp:1684
MessageWin
MessageWin: A window to display an alarm or error message.
Definition: messagewin.h:61
Phonon::MediaObject
QString
AudioThread
Definition: messagewin_p.h:33
QThread::wait
bool wait(unsigned long time)
AudioThread::stop
void stop(bool wait=false)
Definition: messagewin.cpp:1667
QThread
QObject::parent
QObject * parent() const
AudioThread::error
QString error() const
Definition: messagewin.cpp:1826
AudioThread::mAudioOwner
static MessageWin * mAudioOwner
Definition: messagewin_p.h:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalarm

Skip menu "kalarm"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal