ArtsControlApplet::ArtsControlApplet(const QString& configFile, Type type, int actions, QWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name)
{
	//kdDebug()<<"ArtsControlApplet::ArtsControlApplet( const QString& "<<configFile<<", Type "<<type<<", int "<<actions<<", QWidget* "<<parent<<", const char* "<<name<<" )"<<endl;
	// Get the current application configuration handle
	ksConfig = config();

	p = new ArtsControlAppletPrivate( this );
	if( !p->barts ) KMessageBox::information(0, i18n("Something with the ArtsServer went wrong. You probably need to restart aRts and then reload this applet."));
	setCustomMenu(p->menu);

	p->layout = new QBoxLayout( this, QBoxLayout::LeftToRight );
	p->layout->setSpacing( 2 );

	if( p->barts ) {
		p->vu = Arts::StereoVolumeControlGui( p->volume );
		p->vu.label().fontsize( 8 );
		p->vuw = new KArtsWidget( p->vu, this );
		p->vuw->setMinimumSize( 16,16 );
		p->layout->addWidget( p->vuw );
	}

	p->layout->activate();

	QTimer::singleShot( 100, this, SLOT( supdatelayout() ) );

kdDebug()<<"ArtsControlApplet::ArtsControlApplet() finished."<<endl;
}
Beispiel #2
0
UimApplet::UimApplet(const QString& configFile, Type type, int actions,
		     QWidget *parent, const char *name)
     : KPanelApplet(configFile, type, actions, parent, name)
{
    uim_init();
    setBackgroundMode(QWidget::X11ParentRelative);
    toolbar = new UimToolbar(this);
    toolbar->resize(QSize(toolbar->preferedWidthForHeight(), size().height()));
    toolbar->show();
    QObject::connect( toolbar, SIGNAL( toolbarResized() ), this, SLOT( slotToolbarResized() ) );
    setCustomMenu(toolbar->contextMenu());
}
Beispiel #3
0
FifteenApplet::FifteenApplet(const TQString& configFile, Type type, int actions,
                               TQWidget *parent, const char *name)
    : KPanelApplet(configFile, type, actions, parent, name), _aboutData(0)
{
    // setup table
    _table = new PiecesTable(this);
    setCustomMenu(_table->popup());

    // setup layout
    TQHBoxLayout *_layout = new TQHBoxLayout(this);
    _layout->add(_table);

    srand(time(0));
}
Beispiel #4
0
void kweather::initContextMenu()
{
    mContextMenu = new TDEPopupMenu(this);
    mContextMenu->insertTitle(i18n("KWeather - %1").arg( reportLocation ), -1, 0);
    mContextMenu->insertItem(SmallIcon("viewmag"), i18n("Show &Report"),
        this, TQT_SLOT(doReport()), 0, -1, 1);
    mContextMenu->insertItem(SmallIcon("reload"), i18n("&Update Now"),
        this, TQT_SLOT(slotUpdateNow()), 0, -1, 2);
    mContextMenu->insertSeparator();
    mContextMenu->insertItem(SmallIcon("kweather"), i18n("&About KWeather"), this, TQT_SLOT(about()));
    mContextMenu->insertItem(SmallIcon("configure"),
        i18n("&Configure KWeather..."), this, TQT_SLOT(preferences()));
    setCustomMenu(mContextMenu);
}
Beispiel #5
0
QuickLauncher::~QuickLauncher()
{
    TDEGlobal::locale()->removeCatalogue("quicklauncher");
    setCustomMenu(0);
    delete m_popup;
    delete m_appletPopup;
    delete m_removeAppsMenu;
    delete m_popularity;
    clearTempButtons();
    if (m_buttons)
    {
        m_buttons->deleteContents();
        delete m_buttons;
    }
}
Beispiel #6
0
// Builds, connects _popup menu
void QuickLauncher::buildPopupMenu()
{
    QuickAddAppsMenu *addAppsMenu = new QuickAddAppsMenu(this, this);
    m_popup = new TQPopupMenu(this);
    m_popup->insertItem(i18n("Add Application"), addAppsMenu);
    m_configAction->plug(m_popup);

    m_appletPopup = new TQPopupMenu(this);
    m_appletPopup->insertItem(i18n("Add Application"), addAppsMenu);
    m_removeAppsMenu = new TQPopupMenu(this);
    connect(m_removeAppsMenu, TQT_SIGNAL(aboutToShow()),
            TQT_SLOT(fillRemoveAppsMenu()));
    connect(m_removeAppsMenu, TQT_SIGNAL(activated(int)), 
            TQT_SLOT(removeAppManually(int)));
    m_appletPopup->insertItem(i18n("Remove Application"), m_removeAppsMenu);

    m_appletPopup->insertSeparator();
    m_appletPopup->setCheckable( true );
    m_appletPopup->insertItem(i18n("About"), this, TQT_SLOT(about()));
    setCustomMenu(m_appletPopup);
}