You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
140 lines
3.8 KiB
140 lines
3.8 KiB
15 years ago
|
/***************************************************************************
|
||
|
quickbar.h - description
|
||
|
-------------------
|
||
|
begin : Mon Feb 11 2002
|
||
|
copyright : (C) 2002 by Martin Witte / Klas Kalass
|
||
|
email : witte@kawo1.rwth-aachen.de
|
||
|
***************************************************************************/
|
||
|
|
||
|
/***************************************************************************
|
||
|
* *
|
||
|
* 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. *
|
||
|
* *
|
||
|
***************************************************************************/
|
||
|
|
||
13 years ago
|
#ifndef KRADIO_QUICKBAR_H
|
||
|
#define KRADIO_QUICKBAR_H
|
||
15 years ago
|
|
||
|
#ifdef HAVE_CONFIG_H
|
||
|
#include <config.h>
|
||
|
#endif
|
||
|
|
||
14 years ago
|
#include <tqwidget.h>
|
||
15 years ago
|
|
||
|
#include "../../src/include/radio_interfaces.h"
|
||
|
#include "../../src/include/widgetplugins.h"
|
||
|
#include "../../src/include/stationselection_interfaces.h"
|
||
|
|
||
|
class ButtonFlowLayout;
|
||
14 years ago
|
class TQButtonGroup;
|
||
12 years ago
|
class TDEConfig;
|
||
14 years ago
|
class TQToolButton;
|
||
15 years ago
|
|
||
|
/**
|
||
|
*@author Martin Witte / Klas Kalass
|
||
|
*/
|
||
|
|
||
14 years ago
|
class QuickBar : public TQWidget,
|
||
15 years ago
|
public WidgetPluginBase,
|
||
|
public IRadioClient,
|
||
|
public IStationSelection
|
||
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
public:
|
||
14 years ago
|
QuickBar(const TQString &name = TQString());
|
||
15 years ago
|
~QuickBar();
|
||
|
|
||
14 years ago
|
virtual TQString pluginClassName() const { return "QuickBar"; }
|
||
15 years ago
|
|
||
14 years ago
|
const TQString &name() const { return PluginBase::name(); }
|
||
|
TQString &name() { return PluginBase::name(); }
|
||
15 years ago
|
|
||
|
virtual bool connectI(Interface *i);
|
||
|
virtual bool disconnectI(Interface *i);
|
||
|
|
||
|
// IStationSelection
|
||
|
|
||
|
RECEIVERS:
|
||
14 years ago
|
bool setStationSelection(const TQStringList &sl);
|
||
15 years ago
|
|
||
|
ANSWERS:
|
||
14 years ago
|
const TQStringList & getStationSelection () const { return m_stationIDs; }
|
||
15 years ago
|
|
||
|
|
||
|
// PluginBase
|
||
|
|
||
|
public:
|
||
12 years ago
|
virtual void saveState (TDEConfig *) const;
|
||
|
virtual void restoreState (TDEConfig *);
|
||
15 years ago
|
|
||
|
virtual ConfigPageInfo createConfigurationPage();
|
||
|
virtual AboutPageInfo createAboutPage();
|
||
|
|
||
|
// IRadioClient
|
||
|
|
||
|
RECEIVERS:
|
||
|
bool noticePowerChanged(bool on);
|
||
|
bool noticeStationChanged (const RadioStation &, int idx);
|
||
|
bool noticeStationsChanged(const StationList &sl);
|
||
14 years ago
|
bool noticePresetFileChanged(const TQString &/*f*/) { return false; }
|
||
15 years ago
|
|
||
|
bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/) { return false; }
|
||
|
|
||
|
// button/station Management
|
||
|
|
||
|
|
||
|
protected slots:
|
||
|
|
||
|
void buttonClicked(int id);
|
||
|
|
||
|
protected:
|
||
|
|
||
|
int getButtonID(const RadioStation &rs) const;
|
||
|
void activateCurrentButton();
|
||
|
void activateButton(const RadioStation &);
|
||
|
|
||
|
void autoSetCaption();
|
||
|
|
||
|
|
||
14 years ago
|
void dragEnterEvent(TQDragEnterEvent* event);
|
||
|
void dropEvent(TQDropEvent* event);
|
||
15 years ago
|
|
||
|
// KDE/QT
|
||
|
|
||
|
public slots:
|
||
|
|
||
|
void toggleShown() { WidgetPluginBase::pToggleShown(); }
|
||
|
void show();
|
||
|
void hide();
|
||
|
void showOnOrgDesktop();
|
||
14 years ago
|
void setGeometry (const TQRect &r);
|
||
15 years ago
|
void setGeometry (int x, int y, int w, int h);
|
||
|
|
||
|
protected:
|
||
|
void rebuildGUI();
|
||
14 years ago
|
void showEvent(TQShowEvent *);
|
||
|
void hideEvent(TQHideEvent *);
|
||
|
void resizeEvent(TQResizeEvent *);
|
||
15 years ago
|
|
||
14 years ago
|
const TQWidget *getWidget() const { return this; }
|
||
|
TQWidget *getWidget() { return this; }
|
||
15 years ago
|
|
||
|
protected :
|
||
|
|
||
|
ButtonFlowLayout *m_layout;
|
||
14 years ago
|
TQButtonGroup *m_buttonGroup;
|
||
15 years ago
|
|
||
14 years ago
|
TQPtrList<TQToolButton> m_buttons;
|
||
15 years ago
|
|
||
|
// config
|
||
|
bool m_showShortName;
|
||
14 years ago
|
TQStringList m_stationIDs;
|
||
15 years ago
|
|
||
|
bool m_ignoreNoticeActivation;
|
||
|
};
|
||
|
#endif
|