summaryrefslogtreecommitdiffstats
path: root/tdemid/tdemidframe.h
blob: e146762eeb1392129548412c554a3713f1a1120a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/**************************************************************************

    tdemidframe.h  - The main widget of KMid
    Copyright (C) 1997,98  Antonio Larrosa Jimenez

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

    Send comments and bug fixes to larrosa@kde.org
    or to Antonio Larrosa, Rio Arnoya, 10 5B, 29006 Malaga, Spain

***************************************************************************/
#ifndef _KMIDFRAME_H
#define _KMIDFRAME_H

#include <kmainwindow.h>
#include <kmenubar.h>
#include <libtdemid/midiout.h>
#include <libtdemid/player.h>
#include <libtdemid/track.h>
#include <tqtimer.h>
#include <tdelibs_export.h>

class TDEApplication;
class TDEConfig;
class tdemidClient;
class KToolBar;
class TQDragEvent;
class KAccel;

class KDE_EXPORT tdemidFrame : public KMainWindow
{
    Q_OBJECT
  
private:
#ifdef KMidDEBUG
    long passcount;
#endif

    MidiOut *Midi;
    MidiPlayer *Player;
/*
    int playerProcessID;
    PlayerController *pctl;

    int donttoggle;

    TQPopupMenu *m_file;
    TQPopupMenu *m_song;
    TQPopupMenu *m_collections;
    TQPopupMenu *m_options;
    TQPopupMenu *m_help;
*/
    KAccel *kKeysAccel;
protected:
    int autoAddSongToCollection(const TQString& filename=TQString(),int setactive=1);


    virtual void saveProperties(TDEConfig *kcfg);
    virtual void readProperties(TDEConfig *kcfg);

//    virtual void closeEvent(TQCloseEvent *e);

    void dragEnterEvent(TQDragEnterEvent* e);
    void dropEvent ( TQDropEvent * event );


public:
    tdemidFrame(const char *name=0);
    virtual ~tdemidFrame();

public slots:

    void file_Open();
    void file_SaveLyrics();
    void song_stopPause(); // release the pause button and quit the pause mode
    void song_Loop();
    void collect_organize();
    void collect_PlayOrder(int i);
    void collect_AutoAdd();
    void options_FileType(int i);
    void options_DisplayEvents(int i);
    void options_AutomaticText();
    void options_ShowVolumeBar();
    void options_ShowChannelView();
    void options_ChannelViewOptions();
    void options_FontChange();

    void options_MidiSetup();
    void spacePressed();


   virtual void openURL( const TQString s );
/*   virtual void play();
   virtual void pause();
   virtual void stop();
   virtual void rewind();
   virtual void forward();
   virtual void seek(int ms);
   virtual void prevSong();
   virtual void nextSong();
   virtual void setSongLoop(int i);
   virtual void setVolume(int i);
   virtual void setTempo(int i);
   virtual void setSongType( int i );
   virtual void setLyricEvents( int i );
   virtual void selectSong(int i);
   virtual void setActiveCollection( int i );
   virtual void setCollectionPlayMode(int i);
   virtual void setMidiDevice(int i);
*/
    void urlDrop_slot(class TQDropEvent *);

    void rechooseTextEvent();

    void channelViewDestroyed();
    void shuttingDown();

private:
    tdemidClient *tdemidclient;
};

#endif