From 359294c33620c8328d61f67635046d7cc060530c Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Fri, 17 May 2013 12:45:40 -0500 Subject: Rename kdessh -> tdessh and kdelirc -> tdelirc. --- kdelirc/kcmlirc/CMakeLists.txt | 47 -- kdelirc/kcmlirc/Makefile.am | 15 - kdelirc/kcmlirc/addaction.cpp | 375 --------- kdelirc/kcmlirc/addaction.h | 74 -- kdelirc/kcmlirc/addactionbase.ui | 1608 ------------------------------------- kdelirc/kcmlirc/editaction.cpp | 362 --------- kdelirc/kcmlirc/editaction.h | 56 -- kdelirc/kcmlirc/editactionbase.ui | 1287 ----------------------------- kdelirc/kcmlirc/editmode.cpp | 38 - kdelirc/kcmlirc/editmode.h | 34 - kdelirc/kcmlirc/editmodebase.ui | 303 ------- kdelirc/kcmlirc/kcmlirc.cpp | 545 ------------- kdelirc/kcmlirc/kcmlirc.desktop | 119 --- kdelirc/kcmlirc/kcmlirc.h | 85 -- kdelirc/kcmlirc/kcmlircbase.ui | 506 ------------ kdelirc/kcmlirc/kcmlircbase.ui.h | 37 - kdelirc/kcmlirc/modeslist.cpp | 33 - kdelirc/kcmlirc/modeslist.h | 34 - kdelirc/kcmlirc/newmode.ui | 158 ---- kdelirc/kcmlirc/newmode.ui.h | 24 - kdelirc/kcmlirc/selectprofile.ui | 128 --- 21 files changed, 5868 deletions(-) delete mode 100644 kdelirc/kcmlirc/CMakeLists.txt delete mode 100644 kdelirc/kcmlirc/Makefile.am delete mode 100644 kdelirc/kcmlirc/addaction.cpp delete mode 100644 kdelirc/kcmlirc/addaction.h delete mode 100644 kdelirc/kcmlirc/addactionbase.ui delete mode 100644 kdelirc/kcmlirc/editaction.cpp delete mode 100644 kdelirc/kcmlirc/editaction.h delete mode 100644 kdelirc/kcmlirc/editactionbase.ui delete mode 100644 kdelirc/kcmlirc/editmode.cpp delete mode 100644 kdelirc/kcmlirc/editmode.h delete mode 100644 kdelirc/kcmlirc/editmodebase.ui delete mode 100644 kdelirc/kcmlirc/kcmlirc.cpp delete mode 100644 kdelirc/kcmlirc/kcmlirc.desktop delete mode 100644 kdelirc/kcmlirc/kcmlirc.h delete mode 100644 kdelirc/kcmlirc/kcmlircbase.ui delete mode 100644 kdelirc/kcmlirc/kcmlircbase.ui.h delete mode 100644 kdelirc/kcmlirc/modeslist.cpp delete mode 100644 kdelirc/kcmlirc/modeslist.h delete mode 100644 kdelirc/kcmlirc/newmode.ui delete mode 100644 kdelirc/kcmlirc/newmode.ui.h delete mode 100644 kdelirc/kcmlirc/selectprofile.ui (limited to 'kdelirc/kcmlirc') diff --git a/kdelirc/kcmlirc/CMakeLists.txt b/kdelirc/kcmlirc/CMakeLists.txt deleted file mode 100644 index e5c6e2b..0000000 --- a/kdelirc/kcmlirc/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -################################################# -# -# (C) 2012 Golubev Alexander -# fatzer2 (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/kdelirc/irkick - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/kdelirc/irkick - ${CMAKE_SOURCE_DIR}/kdelirc/kdelirc - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} - ${CMAKE_BINARY_DIR}/kdelirc/kdelirc -) - - -##### kcm_kcmlirc (kpart) ####################### - -tde_add_kpart( kcm_kcmlirc AUTOMOC - SOURCES selectprofile.ui newmode.ui - kcmlircbase.ui kcmlirc.cpp addactionbase.ui - addaction.cpp kcmlirc.skel editactionbase.ui - editmodebase.ui editmode.cpp editaction.cpp - modeslist.cpp - LINK kdelirc-static tdeui-shared tdeio-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) - - -##### other data ################################ - -install( FILES kcmlirc.desktop - DESTINATION ${XDG_APPS_INSTALL_DIR} -) - diff --git a/kdelirc/kcmlirc/Makefile.am b/kdelirc/kcmlirc/Makefile.am deleted file mode 100644 index 3707367..0000000 --- a/kdelirc/kcmlirc/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -INCLUDES = -I../irkick -I$(srcdir)/../irkick -I$(srcdir)/../kdelirc $(all_includes) -METASOURCES = AUTO - -# Install this plugin in the KDE modules directory -kde_module_LTLIBRARIES = kcm_kcmlirc.la - -noinst_HEADERS = kcmlirc.h addaction.h addactionbase.h -kcm_kcmlirc_la_SOURCES = selectprofile.ui newmode.ui kcmlircbase.ui kcmlirc.cpp addactionbase.ui addaction.cpp kcmlirc.skel editactionbase.ui editmodebase.ui editmode.cpp editaction.cpp modeslist.cpp -kcm_kcmlirc_la_LIBADD = $(LIB_TDEUI) $(LIB_TDEFILE) ../kdelirc/libkdelirc.la -kcm_kcmlirc_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined - -xdg_apps_DATA = kcmlirc.desktop - -messages: rc.cpp - $(XGETTEXT) *.cpp *.h -o $(podir)/kcmlirc.pot diff --git a/kdelirc/kcmlirc/addaction.cpp b/kdelirc/kcmlirc/addaction.cpp deleted file mode 100644 index 8a87775..0000000 --- a/kdelirc/kcmlirc/addaction.cpp +++ /dev/null @@ -1,375 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Gav Wood * - * gav@kde.org * - * * - * 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. * - ***************************************************************************/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "prototype.h" -#include "addaction.h" -#include "profileserver.h" -#include "remoteserver.h" - -AddAction::AddAction(TQWidget *parent, const char *name, const Mode &mode): AddActionBase(parent, name), theMode(mode) -{ - connect(this, TQT_SIGNAL( selected(const TQString &) ), TQT_SLOT( updateForPageChange() )); - connect(this, TQT_SIGNAL( selected(const TQString &) ), TQT_SLOT( slotCorrectPage() )); - curPage = 0; - updateProfiles(); - updateButtons(); - updateObjects(); - updateProfileFunctions(); -} - -AddAction::~AddAction() -{ -} - - -void AddAction::slotNextParam() -{ - // TODO: go on to next parameter -} - -void AddAction::slotModeSelected() -{ - theSwitchMode->setChecked(true); -} - -void AddAction::slotCorrectPage() -{ - int lastPage = curPage; - curPage = indexOf(currentPage()); - - if(curPage == 2 && theUseProfile->isChecked()) - showPage(((TQWizard *)this)->page(lastPage > 1 ? 1 : 3)); - if((curPage == 2 || curPage == 5) && theChangeMode->isChecked()) - showPage(((TQWizard *)this)->page(lastPage > 1 ? 1 : 6)); - - if(curPage == 3 && theUseDCOP->isChecked()) - showPage(((TQWizard *)this)->page(lastPage == 4 ? 2 : 4)); - - if(curPage == 4 && ( - (theUseDCOP->isChecked() && theFunctions->currentItem() && !Prototype(theFunctions->currentItem()->text(2)).count()) || - (theUseProfile->isChecked() && (theProfileFunctions->currentItem() && !theProfileFunctions->currentItem()->text(1).toInt() || theJustStart->isChecked())) - )) - showPage(((TQWizard *)this)->page(lastPage == 5 ? (theUseDCOP->isChecked() ? 2 : 3) : 5)); -} - -void AddAction::requestNextPress() -{ - IRKick_stub("irkick", "IRKick").stealNextPress(DCOPClient::mainClient()->appId(), "KCMLirc", "gotButton(TQString, TQString)"); -} - -void AddAction::cancelRequest() -{ - IRKick_stub("irkick", "IRKick").dontStealNextPress(); -} - -void AddAction::updateButton(const TQString &remote, const TQString &button) -{ - if(theMode.remote() == remote) - { // note this isn't the "correct" way of doing it; really i should iterate throughg the items and try to find the item which when put through buttonMap[item] returns the current button name. but i cant be arsed. - theButtons->setCurrentItem(theButtons->findItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); - theButtons->ensureItemVisible(theButtons->findItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); - } - else - KMessageBox::error(this, i18n( "You did not select a mode of that remote control. Please use %1, " - "or revert back to select a different mode." ).arg( theMode.remoteName() ), - i18n( "Incorrect Remote Control Detected" )); - - if(indexOf(currentPage()) == 1) - requestNextPress(); -} - -void AddAction::updateButtons() -{ - theButtons->clear(); - buttonMap.clear(); - IRKick_stub IRKick("irkick", "IRKick"); - TQStringList buttons = IRKick.buttons(theMode.remote()); - for(TQStringList::iterator j = buttons.begin(); j != buttons.end(); ++j) - buttonMap[new TQListViewItem(theButtons, RemoteServer::remoteServer()->getButtonName(theMode.remote(), *j))] = *j; -} - -void AddAction::updateForPageChange() -{ - if(indexOf(currentPage()) == 1) requestNextPress(); else cancelRequest(); - switch(indexOf(currentPage())) - { case 0: break; - case 1: break; - case 2: break; - case 3: break; - case 4: break; - } - updateButtonStates(); -} - -void AddAction::updateButtonStates() -{ - switch(indexOf(currentPage())) - { case 0: setNextEnabled(currentPage(), theProfiles->currentItem() != 0 || !theUseProfile->isChecked()); break; - case 1: setNextEnabled(currentPage(), theButtons->currentItem() != 0); break; - case 2: setNextEnabled(currentPage(), theFunctions->currentItem() != 0); break; - case 3: setNextEnabled(currentPage(), theProfileFunctions->currentItem() != 0 || theJustStart->isChecked()); break; - case 4: setNextEnabled(currentPage(), true); break; - case 5: setNextEnabled(currentPage(), false); setFinishEnabled(currentPage(), true); break; - case 6: setNextEnabled(currentPage(), false); setFinishEnabled(currentPage(), theModes->currentItem() || !theSwitchMode->isChecked()); break; - } -} - -const TQStringList AddAction::getFunctions(const TQString app, const TQString obj) -{ - TQStringList ret; - DCOPClient *theClient = TDEApplication::kApplication()->dcopClient(); - QCStringList theApps = theClient->remoteFunctions(app.utf8(), obj.utf8()); - for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) - if( *i != "QCStringList interfaces()" && - *i != "QCStringList functions()" && - *i != "QCStringList objects()" && - *i != "QCStringList find(TQCString)" ) - ret += TQString::fromUtf8(*i); - return ret; -} - -void AddAction::updateProfiles() -{ - ProfileServer *theServer = ProfileServer::profileServer(); - theProfiles->clear(); - profileMap.clear(); - - TQDict dict = theServer->profiles(); - TQDictIterator i(dict); - for(; i.current(); ++i) - profileMap[new TQListViewItem(theProfiles, i.current()->name())] = i.currentKey(); -} - -void AddAction::updateOptions() -{ - IfMulti im; - if(theUseProfile->isChecked()) - { - ProfileServer *theServer = ProfileServer::profileServer(); - if(!theProfiles->currentItem()) return; - const Profile *p = theServer->profiles()[profileMap[theProfiles->currentItem()]]; - im = p->ifMulti(); - isUnique = p->unique(); - } - else if(theUseDCOP->isChecked()) - { - if(!theObjects->selectedItem()) return; - TQListViewItem* i = theObjects->selectedItem()->parent(); - if(!i) return; - isUnique = uniqueProgramMap[i]; - TQRegExp r("(.*)-[0-9]+"); - program = r.exactMatch(nameProgramMap[i]) ? r.cap(1) : nameProgramMap[i]; - im = IM_DONTSEND; - } - else return; - - theIMLabel->setEnabled(!isUnique); - theIMGroup->setEnabled(!isUnique); - theIMLine->setEnabled(!isUnique); - theIMTop->setEnabled(!isUnique); - theDontSend->setEnabled(!isUnique); - theSendToBottom->setEnabled(!isUnique); - theSendToTop->setEnabled(!isUnique); - theSendToAll->setEnabled(!isUnique); - switch(im) - { case IM_DONTSEND: theDontSend->setChecked(true); break; - case IM_SENDTOTOP: theSendToTop->setChecked(true); break; - case IM_SENDTOBOTTOM: theSendToBottom->setChecked(true); break; - case IM_SENDTOALL: theSendToAll->setChecked(true); break; - } -} - -void AddAction::updateProfileFunctions() -{ - ProfileServer *theServer = ProfileServer::profileServer(); - theProfileFunctions->clear(); - profileFunctionMap.clear(); - if(!theProfiles->currentItem()) return; - - const Profile *p = theServer->profiles()[profileMap[theProfiles->currentItem()]]; - TQDict dict = p->actions(); - for(TQDictIterator i(dict); i.current(); ++i) - profileFunctionMap[new TQListViewItem(theProfileFunctions, i.current()->name(), TQString().setNum(i.current()->arguments().count()), i.current()->comment())] = i.currentKey(); - updateParameters(); - updateOptions(); -} - -void AddAction::updateParameters() -{ - theParameters->clear(); - theArguments.clear(); - if(theUseDCOP->isChecked() && theFunctions->currentItem()) - { - Prototype p(theFunctions->currentItem()->text(2)); - for(unsigned k = 0; k < p.count(); k++) - { new TDEListViewItem(theParameters, p.name(k).isEmpty() ? i18n( "" ) : p.name(k), "", p.type(k), TQString().setNum(k + 1)); - theArguments.append(TQVariant("")); - theArguments.back().cast(TQVariant::nameToType(p.type(k).utf8())); - } - } - else if(theUseProfile->isChecked() && theProfiles->currentItem()) - { - ProfileServer *theServer = ProfileServer::profileServer(); - - if(!theProfiles->currentItem()) return; - if(!theProfileFunctions->currentItem()) return; - const Profile *p = theServer->profiles()[profileMap[theProfiles->currentItem()]]; - const ProfileAction *pa = p->actions()[profileFunctionMap[theProfileFunctions->currentItem()]]; - - int index = 1; - for(TQValueList::const_iterator i = pa->arguments().begin(); i != pa->arguments().end(); ++i, index++) - { theArguments.append(TQVariant((*i).getDefault())); - theArguments.back().cast(TQVariant::nameToType((*i).type().utf8())); - new TQListViewItem(theParameters, (*i).comment(), theArguments.back().toString(), (*i).type(), TQString().setNum(index)); - } - - // quicky update options too... - theRepeat->setChecked(pa->repeat()); - theAutoStart->setChecked(pa->autoStart()); - } - - updateParameter(); -} - -void AddAction::updateParameter() -{ - if(theParameters->currentItem()) - { TQString type = theParameters->currentItem()->text(2); - int index = theParameters->currentItem()->text(3).toInt() - 1; - if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1) - { theValue->raiseWidget(2); - theValueIntNumInput->setValue(theArguments[index].toInt()); - } - else if(type.find("double") != -1 || type.find("float") != -1) - { theValue->raiseWidget(3); - theValueDoubleNumInput->setValue(theArguments[index].toDouble()); - } - else if(type.find("bool") != -1) - { theValue->raiseWidget(1); - theValueCheckBox->setChecked(theArguments[index].toBool()); - } - else if(type.find(TQSTRINGLIST_OBJECT_NAME_STRING) != -1) - { theValue->raiseWidget(4); - TQStringList backup = theArguments[index].toStringList(); - // backup needed because calling clear will kill what ever has been saved. - theValueEditListBox->clear(); - theValueEditListBox->insertStringList(backup); - theArguments[index].asStringList() = backup; - } - else - { theValue->raiseWidget(0); - theValueLineEdit->setText(theArguments[index].toString()); - } - theCurParameter->setText(theParameters->currentItem()->text(0)); - theCurParameter->setEnabled(true); - theValue->setEnabled(true); - } - else - { theCurParameter->setText(""); - theValueLineEdit->setText(""); - theValueCheckBox->setChecked(false); - theValueIntNumInput->setValue(0); - theValueDoubleNumInput->setValue(0.0); - theCurParameter->setEnabled(false); - theValue->setEnabled(false); - } -} - -// called when the textbox/checkbox/whatever changes value -void AddAction::slotParameterChanged() -{ - if(!theParameters->currentItem()) return; - int index = theParameters->currentItem()->text(3).toInt() - 1; - TQString type = theParameters->currentItem()->text(2); - if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1) - theArguments[index].asInt() = theValueIntNumInput->value(); - else if(type.find("double") != -1 || type.find("float") != -1) - theArguments[index].asDouble() = theValueDoubleNumInput->value(); - else if(type.find("bool") != -1) - theArguments[index].asBool() = theValueCheckBox->isChecked(); - else if(type.find(TQSTRINGLIST_OBJECT_NAME_STRING) != -1) - theArguments[index].asStringList() = theValueEditListBox->items(); - else - theArguments[index].asString() = theValueLineEdit->text(); - - theArguments[theParameters->currentItem()->text(3).toInt() - 1].cast(TQVariant::nameToType(theParameters->currentItem()->text(2).utf8())); - updateArgument(theParameters->currentItem()); -} - -// takes theArguments[theIndex] and puts it into theItem -void AddAction::updateArgument(TQListViewItem *theItem) -{ - theItem->setText(1, theArguments[theItem->text(3).toInt() - 1].toString()); -} - -void AddAction::updateObjects() -{ - TQStringList names; - theObjects->clear(); - uniqueProgramMap.clear(); - nameProgramMap.clear(); - - DCOPClient *theClient = TDEApplication::kApplication()->dcopClient(); - QCStringList theApps = theClient->registeredApplications(); - for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) - { - if(!TQString(*i).find("anonymous")) continue; - if(!TQString(*i).find(i18n( "anonymous" ))) continue; - TQRegExp r("(.*)-[0-9]+"); - TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i; - if(names.contains(name)) continue; - names += name; - - TDEListViewItem *a = new TDEListViewItem(theObjects, name); - uniqueProgramMap[a] = name == TQString(*i); - nameProgramMap[a] = *i; - - QCStringList theObjects = theClient->remoteObjects(*i); - for(QCStringList::iterator j = theObjects.begin(); j != theObjects.end(); ++j) - if(*j != "tdesycoca" && *j != "qt")// && getFunctions(*i, *j).count()) - new TDEListViewItem(a, *j); - } - updateFunctions(); -} - -void AddAction::updateFunctions() -{ - theFunctions->clear(); - if(theObjects->currentItem() && theObjects->currentItem()->parent()) - { TQStringList functions = getFunctions(nameProgramMap[theObjects->currentItem()->parent()], theObjects->currentItem()->text(0)); - for(TQStringList::iterator i = functions.begin(); i != functions.end(); ++i) - { Prototype p((TQString)(*i)); - new TDEListViewItem(theFunctions, p.name(), p.argumentList(), *i); - } - } - updateOptions(); -} - - -#include "addaction.moc" diff --git a/kdelirc/kcmlirc/addaction.h b/kdelirc/kcmlirc/addaction.h deleted file mode 100644 index 3a3f22f..0000000 --- a/kdelirc/kcmlirc/addaction.h +++ /dev/null @@ -1,74 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Gav Wood * - * gav@kde.org * - * * - * 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. * - ***************************************************************************/ -#ifndef ADDACTION_H -#define ADDACTION_H - -#include -#include - -#include - -#include "mode.h" -#include "arguments.h" - -/** -@author Gav Wood -*/ - -class TQListViewItem; - -class AddAction : public AddActionBase -{ - Q_OBJECT - - - int curPage; - Mode theMode; - -public slots: - virtual void slotCorrectPage(); - virtual void slotModeSelected(); - virtual void slotNextParam(); - virtual void slotParameterChanged(); - - // connected to KCMLirc class to receive DCOP calls to tell it what button has been pressed - virtual void updateForPageChange(); - virtual void updateButton(const TQString &remote, const TQString &button); - virtual void updateButtons(); - virtual void updateFunctions(); - virtual void updateObjects(); - virtual void updateButtonStates(); - virtual void updateParameters(); - virtual void updateParameter(); - virtual void updateProfiles(); - virtual void updateProfileFunctions(); - virtual void updateOptions(); - -public: - Arguments theArguments; - TQString program; - bool isUnique; - - static const TQStringList getFunctions(const TQString app, const TQString obj); - void updateArgument(TQListViewItem *theItem); - void requestNextPress(); - void cancelRequest(); - - TQMap profileMap; - TQMap profileFunctionMap; - TQMap buttonMap; - TQMap uniqueProgramMap; - TQMap nameProgramMap; - - AddAction(TQWidget *parent, const char *name, const Mode &mode); - ~AddAction(); -}; - -#endif diff --git a/kdelirc/kcmlirc/addactionbase.ui b/kdelirc/kcmlirc/addactionbase.ui deleted file mode 100644 index dfb6f12..0000000 --- a/kdelirc/kcmlirc/addactionbase.ui +++ /dev/null @@ -1,1608 +0,0 @@ - -AddActionBase -Gav Wood - - - AddActionBase - - - - 0 - 0 - 723 - 593 - - - - Add Action - - - - page - - - Select Action to Carry Out on Button Press - - - - unnamed - - - - buttonGroup1 - - - - 5 - 5 - 0 - 1 - - - - NoFrame - - - - - - - unnamed - - - 0 - - - - theUseProfile - - - I wish to select an &application below for usage: - - - true - - - - - layout14 - - - - unnamed - - - - spacer13 - - - Horizontal - - - Expanding - - - - 81 - 31 - - - - - - - Applications - - - true - - - true - - - - theProfiles - - - - 7 - 7 - 3 - 0 - - - - true - - - - - spacer14 - - - Horizontal - - - Expanding - - - - 101 - 31 - - - - - - - - spacer11 - - - Horizontal - - - Expanding - - - - 311 - 20 - - - - - - theUseDCOP - - - I wish to manually select a &function from a running program - - - - - spacer12 - - - Horizontal - - - Expanding - - - - 321 - 21 - - - - - - theChangeMode - - - I wish to change the remote control's &mode - - - - - spacer4 - - - Vertical - - - Expanding - - - - 21 - 20 - - - - - - - - - - page - - - Select Button to Configure - - - - unnamed - - - - theButtonText - - - You are attempting to configure an action for a button on [remote] (in mode [mode]). Press a button on this remote control or select from the list. - - - WordBreak|AlignVCenter - - - - - layout6 - - - - unnamed - - - - spacer12_2 - - - Horizontal - - - Expanding - - - - 110 - 41 - - - - - - - Button - - - true - - - true - - - - theButtons - - - - 7 - 7 - 2 - 0 - - - - true - - - - - spacer5 - - - Horizontal - - - Expanding - - - - 110 - 31 - - - - - - - - - - page - - - Select Program Function - - - - unnamed - - - - splitter8 - - - Horizontal - - - - - Program - - - true - - - true - - - - - IR Kick - - - - - - - - Xine - - - - - - - - kicker - - - - - - - kicker - - - - - - - - - noatun - - - - - - - Marquis - - - - - - - - Noatun - - - - - - - - noatun - - - - - - - - theObjects - - - - 7 - 7 - 0 - 1 - - - - true - - - false - - - - - layout13 - - - - unnamed - - - 0 - - - - - Function - - - true - - - true - - - - - Parameter - - - true - - - true - - - - - Prototype - - - true - - - true - - - - theFunctions - - - - 3 - 7 - 0 - 0 - - - - - - - - - - - page - - - Select Program Function - - - - unnamed - - - - buttonGroup4 - - - NoFrame - - - - - - - unnamed - - - - theNotJustStart - - - &Perform a function in the application: - - - true - - - - - layout37 - - - - unnamed - - - - spacer39 - - - Horizontal - - - Expanding - - - - 61 - 21 - - - - - - - Function - - - true - - - true - - - - - Options - - - true - - - true - - - - - Description - - - true - - - true - - - - theProfileFunctions - - - - 7 - 7 - 7 - 0 - - - - true - - - - - - - theJustStart - - - &Just start the application. Do not do anything else. - - - - - spacer40 - - - Vertical - - - Expanding - - - - 21 - 81 - - - - - - - - - - page - - - Populate Parameters - - - - unnamed - - - - - Option Description - - - true - - - true - - - - - Value - - - true - - - true - - - - - Type - - - true - - - true - - - - - Place - - - true - - - true - - - - theParameters - - - - - layout35 - - - - unnamed - - - - layout34 - - - - unnamed - - - - spacer32 - - - Vertical - - - Expanding - - - - 21 - 111 - - - - - - theCurParameter - - - false - - - - 3 - 5 - 0 - 0 - - - - Parameter: - - - - - - - spacer27 - - - Horizontal - - - Expanding - - - - 146 - 21 - - - - - - theValue - - - true - - - - 7 - 5 - 0 - 0 - - - - - page - - - 0 - - - - unnamed - - - 0 - - - - spacer28 - - - Vertical - - - Expanding - - - - 21 - 61 - - - - - - theValueLineEdit - - - true - - - - - - - page - - - 1 - - - - unnamed - - - 0 - - - - spacer29 - - - Vertical - - - Expanding - - - - 21 - 61 - - - - - - theValueCheckBox - - - true - - - - - - - - - - page - - - 2 - - - - unnamed - - - 0 - - - - spacer30 - - - Vertical - - - Expanding - - - - 20 - 61 - - - - - - theValueIntNumInput - - - - - - - page - - - 3 - - - - unnamed - - - 0 - - - - spacer31 - - - Vertical - - - Expanding - - - - 21 - 51 - - - - - - theValueDoubleNumInput - - - - - - - page - - - 4 - - - - unnamed - - - 0 - - - - theValueEditListBox - - - - - - - - - - - spacer26 - - - Horizontal - - - Expanding - - - - 147 - 21 - - - - - - - - - - page - - - Finishing Up - - - - unnamed - - - - textLabel1 - - - - 1 - - - - Miscellaneous Options - - - - - line1_2 - - - HLine - - - Sunken - - - Horizontal - - - - - theRepeat - - - This action is &repeatable if the button is held down - - - - - theAutoStart - - - This action causes the application to &start if not already running - - - true - - - - - spacer22 - - - Horizontal - - - Expanding - - - - 670 - 20 - - - - - - theIMTop - - - false - - - - 1 - - - - Multiple Instances - - - - - theIMLine - - - false - - - HLine - - - Sunken - - - Horizontal - - - - - theIMLabel - - - false - - - This application may have multiple instances. In the case of having multiple instances at once when this action should be executed, choose a course of action: - - - WordBreak|AlignVCenter - - - - - theIMGroup - - - false - - - NoFrame - - - 0 - - - - - - - unnamed - - - 0 - - - - theDontSend - - - false - - - &Ignore the action - - - true - - - - - theSendToTop - - - false - - - Send the action to the instance hi&ghest in the window stacking order - - - - - theSendToBottom - - - false - - - Send the action to the instance &lowest in window stacking order - - - - - theSendToAll - - - false - - - Send the action to &all instances - - - - - - - spacer1 - - - Vertical - - - Expanding - - - - 20 - 170 - - - - - - - - page - - - Select Required Mode Change - - - - unnamed - - - - buttonGroup3 - - - NoFrame - - - - - - - unnamed - - - 0 - - - - theSwitchMode - - - &Switch to mode: - - - - - layout13 - - - - unnamed - - - - spacer8 - - - Horizontal - - - Expanding - - - - 131 - 31 - - - - - - - Mode - - - true - - - true - - - - theModes - - - - 7 - 7 - 3 - 0 - - - - true - - - - - spacer9 - - - Horizontal - - - Expanding - - - - 131 - 31 - - - - - - - - theExitMode - - - &Exit current mode - - - true - - - - - spacer15_2 - - - Horizontal - - - Expanding - - - - 551 - 20 - - - - - - textLabel1_2 - - - <b>Options</b> - - - - - line2 - - - HLine - - - Sunken - - - Horizontal - - - - - theDoBefore - - - E&xecute all other actions before mode change (in original mode) - - - true - - - - - theDoAfter - - - Exec&ute all actions after mode change (in new mode) - - - - - spacer10 - - - Vertical - - - Expanding - - - - 21 - 30 - - - - - - - - - - - - - theObjects - currentChanged(TQListViewItem*) - AddActionBase - updateFunctions() - - - theParameters - currentChanged(TQListViewItem*) - AddActionBase - updateParameter() - - - theFunctions - currentChanged(TQListViewItem*) - AddActionBase - updateButtonStates() - - - theSwitchMode - stateChanged(int) - AddActionBase - updateButtonStates() - - - theExitMode - stateChanged(int) - AddActionBase - updateButtonStates() - - - theChangeMode - stateChanged(int) - AddActionBase - updateButtonStates() - - - theUseDCOP - stateChanged(int) - AddActionBase - updateButtonStates() - - - theUseProfile - stateChanged(int) - AddActionBase - updateButtonStates() - - - theProfiles - currentChanged(TQListViewItem*) - AddActionBase - updateButtonStates() - - - theModes - currentChanged(TQListViewItem*) - AddActionBase - updateButtonStates() - - - theModes - clicked(TQListViewItem*) - AddActionBase - slotModeSelected() - - - theUseProfile - toggled(bool) - theProfiles - setEnabled(bool) - - - theValueDoubleNumInput - valueChanged(double) - AddActionBase - slotParameterChanged() - - - theValueIntNumInput - valueChanged(int) - AddActionBase - slotParameterChanged() - - - theValueLineEdit - textChanged(const TQString&) - AddActionBase - slotParameterChanged() - - - theValueCheckBox - toggled(bool) - AddActionBase - slotParameterChanged() - - - theProfileFunctions - currentChanged(TQListViewItem*) - AddActionBase - updateParameters() - - - theFunctions - currentChanged(TQListViewItem*) - AddActionBase - updateParameters() - - - theProfiles - currentChanged(TQListViewItem*) - AddActionBase - updateProfileFunctions() - - - theValueEditListBox - changed() - AddActionBase - slotParameterChanged() - - - theNotJustStart - toggled(bool) - theProfileFunctions - setEnabled(bool) - - - theNotJustStart - toggled(bool) - theAutoStart - setEnabled(bool) - - - theJustStart - toggled(bool) - theAutoStart - setChecked(bool) - - - theNotJustStart - toggled(bool) - theRepeat - setEnabled(bool) - - - theNotJustStart - toggled(bool) - theRepeat - setChecked(bool) - - - theProfileFunctions - currentChanged(TQListViewItem*) - AddActionBase - updateOptions() - - - theFunctions - currentChanged(TQListViewItem*) - AddActionBase - updateOptions() - - - theProfiles - doubleClicked(TQListViewItem*) - AddActionBase - next() - - - theButtons - doubleClicked(TQListViewItem*) - AddActionBase - next() - - - theFunctions - doubleClicked(TQListViewItem*) - AddActionBase - next() - - - theProfileFunctions - doubleClicked(TQListViewItem*) - AddActionBase - next() - - - theModes - doubleClicked(TQListViewItem*) - AddActionBase - accept() - - - - updateFunctions() - updateParameter() - updateParameters() - updateButtonStates() - updateCurrentParam(const TQString &) - slotNextParam() - slotCorrectPage() - slotModeSelected() - updateProfileFunctions() - updateForPageChange() - slotParameterChanged() - updateOptions() - - - - tdelistview.h - tdelistview.h - tdelistview.h - tdelistview.h - tdelistview.h - tdelistview.h - klineedit.h - knuminput.h - knuminput.h - knuminput.h - knuminput.h - keditlistbox.h - klineedit.h - tdelistview.h - - diff --git a/kdelirc/kcmlirc/editaction.cpp b/kdelirc/kcmlirc/editaction.cpp deleted file mode 100644 index 8d8a0cb..0000000 --- a/kdelirc/kcmlirc/editaction.cpp +++ /dev/null @@ -1,362 +0,0 @@ -// -// -// C++ Implementation: $MODULE$ -// -// Description: -// -// -// Author: Gav Wood , (C) 2003 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "prototype.h" -#include "profileserver.h" -#include "remoteserver.h" -#include "editaction.h" -#include "addaction.h" - -EditAction::EditAction(IRAIt action, TQWidget *parent, const char *name) : EditActionBase(parent, name) -{ - theAction = action; - - updateApplications(); - updateDCOPApplications(); -} - -EditAction::~EditAction() -{ -} - -void EditAction::readFrom() -{ - theRepeat->setChecked((*theAction).repeat()); - theAutoStart->setChecked((*theAction).autoStart()); - theDoBefore->setChecked((*theAction).doBefore()); - theDoAfter->setChecked((*theAction).doAfter()); - theDontSend->setChecked((*theAction).ifMulti() == IM_DONTSEND); - theSendToTop->setChecked((*theAction).ifMulti() == IM_SENDTOTOP); - theSendToBottom->setChecked((*theAction).ifMulti() == IM_SENDTOBOTTOM); - theSendToAll->setChecked((*theAction).ifMulti() == IM_SENDTOALL); - - if((*theAction).isModeChange()) - { // change mode - theChangeMode->setChecked(true); - if((*theAction).object().isEmpty()) - theModes->setCurrentText(i18n("[Exit current mode]")); - else - theModes->setCurrentText((*theAction).object()); - } - else if((*theAction).isJustStart()) - { // profile action - theUseProfile->setChecked(true); - const Profile *p = ProfileServer::profileServer()->profiles()[(*theAction).program()]; - theApplications->setCurrentText(p->name()); - updateFunctions(); - updateArguments(); - theJustStart->setChecked(true); - } - else if(ProfileServer::profileServer()->getAction((*theAction).program(), (*theAction).object(), (*theAction).method().prototype())) - { // profile action - theUseProfile->setChecked(true); - const ProfileAction *a = ProfileServer::profileServer()->getAction((*theAction).program(), (*theAction).object(), (*theAction).method().prototype()); - theApplications->setCurrentText(a->profile()->name()); - updateFunctions(); - theFunctions->setCurrentText(a->name()); - arguments = (*theAction).arguments(); - updateArguments(); - theNotJustStart->setChecked(true); - } - else - { // dcop action - theUseDCOP->setChecked(true); - theDCOPApplications->setCurrentText((*theAction).program()); - updateDCOPObjects(); - theDCOPObjects->setCurrentText((*theAction).object()); - updateDCOPFunctions(); - theDCOPFunctions->setCurrentText((*theAction).method().prototype()); - arguments = (*theAction).arguments(); - updateArguments(); - } - updateOptions(); -} - -void EditAction::writeBack() -{ - if(theChangeMode->isChecked()) - { - (*theAction).setProgram(""); - if(theModes->currentText() == i18n("[Exit current mode]")) - (*theAction).setObject(""); - else - (*theAction).setObject(theModes->currentText()); - (*theAction).setDoBefore(theDoBefore->isChecked()); - (*theAction).setDoAfter(theDoAfter->isChecked()); - } - else if(theUseProfile->isChecked() && ( - ProfileServer::profileServer()->getAction(applicationMap[theApplications->currentText()], functionMap[theFunctions->currentText()]) - || - theJustStart->isChecked() && ProfileServer::profileServer()->profiles()[theApplications->currentText()] - ) - ) - { if(theJustStart->isChecked()) - { (*theAction).setProgram(ProfileServer::profileServer()->profiles()[applicationMap[theApplications->currentText()]]->id()); - (*theAction).setObject(""); - } - else - { const ProfileAction *a = ProfileServer::profileServer()->getAction(applicationMap[theApplications->currentText()], functionMap[theFunctions->currentText()]); - (*theAction).setProgram(ProfileServer::profileServer()->profiles()[applicationMap[theApplications->currentText()]]->id()); - (*theAction).setObject(a->objId()); - (*theAction).setMethod(a->prototype()); - (*theAction).setArguments(arguments); - } - } - else - { - (*theAction).setProgram(program);//theDCOPApplications->currentText()); - (*theAction).setObject(theDCOPObjects->currentText()); - (*theAction).setMethod(theDCOPFunctions->currentText()); - (*theAction).setArguments(arguments); - } - (*theAction).setRepeat(theRepeat->isChecked()); - (*theAction).setAutoStart(theAutoStart->isChecked()); - (*theAction).setUnique(isUnique); - (*theAction).setIfMulti(theDontSend->isChecked() ? IM_DONTSEND : theSendToTop->isChecked() ? IM_SENDTOTOP : theSendToBottom->isChecked() ? IM_SENDTOBOTTOM : IM_SENDTOALL); -} - -void EditAction::updateArguments() -{ - kdDebug() << k_funcinfo << endl; - if(theUseProfile->isChecked()) - { - theArguments->clear(); - const ProfileAction *a = ProfileServer::profileServer()->getAction(applicationMap[theApplications->currentText()], functionMap[theFunctions->currentText()]); - if(!a) { arguments.clear(); return; } - const TQValueList &p = a->arguments(); - if(p.count() != arguments.count()) - { arguments.clear(); - for(unsigned i = 0; i < p.count(); i++) - arguments.append(TQVariant("")); - } - theArguments->setEnabled(p.count()); - for(unsigned i = 0; i < p.count(); i++) - { theArguments->insertItem(p[i].comment() + " (" + p[i].type() + ")"); - arguments[i].cast(TQVariant::nameToType(p[i].type().utf8())); - } - if(p.count()) updateArgument(0); else updateArgument(-1); - } - else if(theUseDCOP->isChecked()) - { - theArguments->clear(); - Prototype p(theDCOPFunctions->currentText()); - if(p.count() != arguments.count()) - { arguments.clear(); - for(unsigned i = 0; i < p.count(); i++) - arguments.append(TQVariant("")); - } - theArguments->setEnabled(p.count()); - for(unsigned i = 0; i < p.count(); i++) - { theArguments->insertItem(TQString(TQString().setNum(i + 1) + ": " + (p.name(i).isEmpty() ? p.type(i) : p.name(i) + " (" + p.type(i) + ")"))); - arguments[i].cast(TQVariant::nameToType(p.type(i).utf8())); - } - if(p.count()) updateArgument(0); else updateArgument(-1); - } -} - -void EditAction::updateOptions() -{ - if (theUseProfile->isChecked()) - { - ProfileServer *theServer = ProfileServer::profileServer(); - if(!theApplications->currentItem()) return; - const Profile *p = theServer->profiles()[applicationMap[theApplications->currentText()]]; - isUnique = p->unique(); - } - else if (theUseDCOP->isChecked()) - { - if(theDCOPApplications->currentText().isNull() || theDCOPApplications->currentText().isEmpty()) return; - program = theDCOPApplications->currentText(); - isUnique = uniqueProgramMap[theDCOPApplications->currentText()]; - } - else - isUnique = true; - - theIMLabel->setEnabled(!isUnique); - theIMGroup->setEnabled(!isUnique); - theDontSend->setEnabled(!isUnique); - theSendToTop->setEnabled(!isUnique); - theSendToBottom->setEnabled(!isUnique); - theSendToAll->setEnabled(!isUnique); -} - -// called when the textbox/checkbox/whatever changes value -void EditAction::slotParameterChanged() -{ - kdDebug() << "in: " << arguments[theArguments->currentItem()].toString() << endl; - int type = arguments[theArguments->currentItem()].type(); - kdDebug() << type << endl; - switch(type) - { - case TQVariant::Int: case TQVariant::UInt: - arguments[theArguments->currentItem()].asInt() = theValueIntNumInput->value(); - break; - case TQVariant::Double: - arguments[theArguments->currentItem()].asDouble() = theValueDoubleNumInput->value(); - break; - case TQVariant::Bool: - arguments[theArguments->currentItem()].asBool() = theValueCheckBox->isChecked(); - break; - case TQVariant::StringList: - arguments[theArguments->currentItem()].asStringList() = theValueEditListBox->items(); - break; - default: - arguments[theArguments->currentItem()].asString() = theValueLineEdit->text(); - } - arguments[theArguments->currentItem()].cast(TQVariant::Type(type)); - kdDebug() << "out: " << arguments[theArguments->currentItem()].toString() << endl; - -} - -void EditAction::updateArgument(int index) -{ - kdDebug() << k_funcinfo << " i: " << index << endl; - if(index >= 0) - { switch(arguments[index].type()) - { - case TQVariant::Int: case TQVariant::UInt: - theValue->raiseWidget(2); - theValueIntNumInput->setValue(arguments[index].toInt()); - break; - case TQVariant::Double: - theValue->raiseWidget(3); - theValueDoubleNumInput->setValue(arguments[index].toDouble()); - break; - case TQVariant::Bool: - theValue->raiseWidget(1); - theValueCheckBox->setChecked(arguments[index].toBool()); - break; - case TQVariant::StringList: - { theValue->raiseWidget(4); - TQStringList backup = arguments[index].toStringList(); - // backup needed because calling clear will kill what ever has been saved. - theValueEditListBox->clear(); - theValueEditListBox->insertStringList(backup); - arguments[index].asStringList() = backup; - break; - } - default: - theValue->raiseWidget(0); - theValueLineEdit->setText(arguments[index].toString()); - } - theValue->setEnabled(true); - } - else - { theValueLineEdit->setText(""); - theValueCheckBox->setChecked(false); - theValueIntNumInput->setValue(0); - theValueDoubleNumInput->setValue(0.0); - theValue->setEnabled(false); - } -} - -void EditAction::updateApplications() -{ - ProfileServer *theServer = ProfileServer::profileServer(); - theApplications->clear(); - applicationMap.clear(); - - TQDict dict = theServer->profiles(); - TQDictIterator i(dict); - for(; i.current(); ++i) - { theApplications->insertItem(i.current()->name()); - applicationMap[i.current()->name()] = i.currentKey(); - } - updateFunctions(); -} - -void EditAction::updateFunctions() -{ - ProfileServer *theServer = ProfileServer::profileServer(); - theFunctions->clear(); - functionMap.clear(); - if(theApplications->currentText().isNull() || theApplications->currentText().isEmpty()) return; - - const Profile *p = theServer->profiles()[applicationMap[theApplications->currentText()]]; - - TQDict dict = p->actions(); - for(TQDictIterator i(dict); i.current(); ++i) - { theFunctions->insertItem(i.current()->name()); - functionMap[i.current()->name()] = i.currentKey(); - } - updateArguments(); -} - -void EditAction::updateDCOPApplications() -{ - TQStringList names; - - theDCOPApplications->clear(); - DCOPClient *theClient = TDEApplication::kApplication()->dcopClient(); - QCStringList theApps = theClient->registeredApplications(); - for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) - { - if(!TQString(*i).find("anonymous")) continue; - TQRegExp r("(.*)-[0-9]+"); - TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i; - if(names.contains(name)) continue; - names += name; - - theDCOPApplications->insertItem(name); - uniqueProgramMap[name] = name == TQString(*i); - nameProgramMap[name] = *i; - - - } - updateDCOPObjects(); -} - -void EditAction::updateDCOPObjects() -{ - theDCOPObjects->clear(); - DCOPClient *theClient = TDEApplication::kApplication()->dcopClient(); - if(theDCOPApplications->currentText().isNull() || theDCOPApplications->currentText().isEmpty()) return; - QCStringList theObjects = theClient->remoteObjects(nameProgramMap[theDCOPApplications->currentText()].utf8()); - if(!theObjects.size() && theDCOPApplications->currentText() == (*theAction).program()) theDCOPObjects->insertItem((*theAction).object()); - for(QCStringList::iterator j = theObjects.begin(); j != theObjects.end(); ++j) - if(*j != "tdesycoca" && *j != "qt" && AddAction::getFunctions(nameProgramMap[theDCOPApplications->currentText()], *j).count()) - theDCOPObjects->insertItem(TQString::fromUtf8(*j)); - updateDCOPFunctions(); -} - -void EditAction::updateDCOPFunctions() -{ - theDCOPFunctions->clear(); - if(theDCOPApplications->currentText().isNull() || theDCOPApplications->currentText().isEmpty()) return; - TQStringList functions = AddAction::getFunctions(nameProgramMap[theDCOPApplications->currentText()], theDCOPObjects->currentText()); - if(!functions.size() && theDCOPApplications->currentText() == (*theAction).program()) theDCOPFunctions->insertItem((*theAction).method().prototype()); - for(TQStringList::iterator i = functions.begin(); i != functions.end(); ++i) - theDCOPFunctions->insertItem(*i); - updateArguments(); -} - - -#include "editaction.moc" diff --git a/kdelirc/kcmlirc/editaction.h b/kdelirc/kcmlirc/editaction.h deleted file mode 100644 index 8b19b6a..0000000 --- a/kdelirc/kcmlirc/editaction.h +++ /dev/null @@ -1,56 +0,0 @@ -// -// -// C++ Interface: $MODULE$ -// -// Description: -// -// -// Author: Gav Wood , (C) 2003 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#ifndef EDITACTION_H -#define EDITACTION_H - -#include - -#include "iractions.h" -#include "editactionbase.h" -#include "arguments.h" - -/** -@author Gav Wood -*/ - -class EditAction : public EditActionBase -{ - Q_OBJECT - - IRAIt theAction; - TQMap applicationMap, functionMap; - TQMap nameProgramMap; - TQMap uniqueProgramMap; - Arguments arguments; - TQString program; - bool isUnique; - -public: - void writeBack(); - void readFrom(); - - virtual void slotParameterChanged(); - virtual void updateArgument(int index); - virtual void updateArguments(); - virtual void updateApplications(); - virtual void updateFunctions(); - virtual void updateOptions(); - virtual void updateDCOPApplications(); - virtual void updateDCOPObjects(); - virtual void updateDCOPFunctions(); - - EditAction(IRAIt action, TQWidget *parent = 0, const char *name = 0); - ~EditAction(); -}; - -#endif diff --git a/kdelirc/kcmlirc/editactionbase.ui b/kdelirc/kcmlirc/editactionbase.ui deleted file mode 100644 index 7e1a006..0000000 --- a/kdelirc/kcmlirc/editactionbase.ui +++ /dev/null @@ -1,1287 +0,0 @@ - -EditActionBase - - - EditActionBase - - - - 0 - 0 - 754 - 715 - - - - Edit Action - - - true - - - - unnamed - - - - tabWidget3 - - - - tab - - - Function - - - - unnamed - - - - buttonGroup3 - - - NoFrame - - - - - - - unnamed - - - 0 - - - - layout40 - - - - unnamed - - - - theDCOPApplications - - - false - - - - 5 - 0 - 0 - 0 - - - - - - textLabel4_3 - - - false - - - O&bject: - - - theDCOPObjects - - - - - buttonGroup5 - - - NoFrame - - - - - - - unnamed - - - 0 - - - - theNotJustStart - - - - 3 - 0 - 0 - 0 - - - - &Perform function: - - - true - - - - - theFunctions - - - - 3 - 0 - 0 - 0 - - - - - - theJustStart - - - Just start application - - - - - - - textLabel4_2 - - - false - - - Fu&nction: - - - theDCOPFunctions - - - - - textLabel5 - - - &Application: - - - theApplications - - - - - theApplications - - - - 5 - 0 - 0 - 0 - - - - - - theDCOPFunctions - - - false - - - - - theUseProfile - - - &Use application: - - - true - - - - - textLabel5_2 - - - false - - - App&lication: - - - theDCOPApplications - - - - - theUseDCOP - - - Use &DCOP: - - - - - theDCOPObjects - - - false - - - - - - - layout36 - - - - unnamed - - - - theValue - - - true - - - - 7 - 5 - 0 - 0 - - - - - page - - - 0 - - - - unnamed - - - 0 - - - - theValueLineEdit - - - true - - - - - spacer35 - - - Vertical - - - Expanding - - - - 20 - 91 - - - - - - - - page - - - 1 - - - - unnamed - - - 0 - - - - theValueCheckBox - - - true - - - - - - - - spacer36 - - - Vertical - - - Expanding - - - - 20 - 101 - - - - - - - - page - - - 2 - - - - unnamed - - - 0 - - - - theValueIntNumInput - - - - - spacer37 - - - Vertical - - - Expanding - - - - 21 - 101 - - - - - - - - page - - - 3 - - - - unnamed - - - 0 - - - - theValueDoubleNumInput - - - - - spacer38 - - - Vertical - - - Expanding - - - - 20 - 101 - - - - - - - - page - - - 4 - - - - unnamed - - - 0 - - - - theValueEditListBox - - - - 3 - 3 - 0 - 0 - - - - - - - - - - - - spacer33 - - - Vertical - - - Expanding - - - - 21 - 111 - - - - - - theArguments - - - - 3 - 0 - 0 - 0 - - - - - 106 - 0 - - - - - - spacer34 - - - Vertical - - - Expanding - - - - 20 - 101 - - - - - - textLabel8 - - - A&pplication/DCOP options: - - - theArguments - - - - - - - spacer14 - - - Horizontal - - - Expanding - - - - 481 - 20 - - - - - - layout17 - - - - unnamed - - - - theChangeMode - - - Change &mode to: - - - - - theModes - - - false - - - - 7 - 0 - 0 - 0 - - - - - - - - spacer15 - - - Vertical - - - Expanding - - - - 21 - 30 - - - - - - - - - - tab - - - Options - - - - unnamed - - - - textLabel3 - - - <b>DCOP/Application Action Options</b> - - - - - line2 - - - HLine - - - Sunken - - - Horizontal - - - - - theRepeat - - - &Action repeats if button is held down - - - - - theAutoStart - - - &Start program/service if not already running - - - - - spacer20 - - - Horizontal - - - Expanding - - - - 491 - 20 - - - - - - textLabel1_2 - - - <b>Mode Change Options</b> - - - - - line2_2 - - - HLine - - - Sunken - - - Horizontal - - - - - theDoBefore - - - false - - - E&xecute all other actions before mode change (in original mode) - - - true - - - - - theDoAfter - - - false - - - Exec&ute all actions after mode change (in new mode) - - - - - spacer22 - - - Horizontal - - - Expanding - - - - 670 - 20 - - - - - - theIMTop - - - true - - - - 1 - - - - Multiple Instances - - - - - theIMLine - - - true - - - HLine - - - Sunken - - - Horizontal - - - - - theIMLabel - - - false - - - This application may have multiple instances. In the case of having multiple instances at once when this action should be executed, choose a course of action: - - - WordBreak|AlignVCenter - - - - - theIMGroup - - - false - - - NoFrame - - - 0 - - - - - - - unnamed - - - 0 - - - - theDontSend - - - false - - - &Ignore the action - - - true - - - - - theSendToTop - - - false - - - Send the action to the instance hi&ghest in window stacking order - - - - - theSendToBottom - - - false - - - Send the action to the instance &lowest in window stacking order - - - - - theSendToAll - - - false - - - Send the action to all i&nstances - - - - - - - spacer3 - - - Vertical - - - Expanding - - - - 20 - 150 - - - - - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - F1 - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - true - - - true - - - - - buttonCancel - - - &Cancel - - - true - - - - - - - - - - - buttonOk - clicked() - EditActionBase - accept() - - - buttonCancel - clicked() - EditActionBase - reject() - - - theUseProfile - toggled(bool) - theApplications - setEnabled(bool) - - - theUseProfile - toggled(bool) - theFunctions - setEnabled(bool) - - - theUseDCOP - toggled(bool) - theDCOPApplications - setEnabled(bool) - - - theUseDCOP - toggled(bool) - theDCOPObjects - setEnabled(bool) - - - theUseDCOP - toggled(bool) - theDCOPFunctions - setEnabled(bool) - - - theChangeMode - toggled(bool) - theModes - setEnabled(bool) - - - theApplications - activated(const TQString&) - EditActionBase - updateFunctions() - - - theDCOPApplications - activated(const TQString&) - EditActionBase - updateDCOPObjects() - - - theDCOPObjects - activated(const TQString&) - EditActionBase - updateDCOPFunctions() - - - theFunctions - activated(const TQString&) - EditActionBase - updateArguments() - - - theDCOPFunctions - activated(const TQString&) - EditActionBase - updateArguments() - - - theUseProfile - toggled(bool) - theArguments - setEnabled(bool) - - - theUseDCOP - toggled(bool) - theArguments - setEnabled(bool) - - - theArguments - activated(int) - EditActionBase - updateArgument(int) - - - theUseProfile - clicked() - EditActionBase - updateArguments() - - - theUseDCOP - clicked() - EditActionBase - updateArguments() - - - theUseProfile - toggled(bool) - theAutoStart - setEnabled(bool) - - - theUseDCOP - toggled(bool) - theAutoStart - setEnabled(bool) - - - theUseProfile - toggled(bool) - theRepeat - setEnabled(bool) - - - theUseDCOP - toggled(bool) - theRepeat - setEnabled(bool) - - - theChangeMode - toggled(bool) - theDoAfter - setEnabled(bool) - - - theChangeMode - toggled(bool) - theDoBefore - setEnabled(bool) - - - theValueDoubleNumInput - valueChanged(double) - EditActionBase - slotParameterChanged() - - - theValueLineEdit - textChanged(const TQString&) - EditActionBase - slotParameterChanged() - - - theValueCheckBox - toggled(bool) - EditActionBase - slotParameterChanged() - - - theValueIntNumInput - valueChanged(int) - EditActionBase - slotParameterChanged() - - - theValueEditListBox - changed() - EditActionBase - slotParameterChanged() - - - theNotJustStart - toggled(bool) - theFunctions - setEnabled(bool) - - - theJustStart - toggled(bool) - theAutoStart - setChecked(bool) - - - theNotJustStart - toggled(bool) - theRepeat - setChecked(bool) - - - theNotJustStart - toggled(bool) - theAutoStart - setEnabled(bool) - - - theNotJustStart - toggled(bool) - theRepeat - setEnabled(bool) - - - theNotJustStart - toggled(bool) - theArguments - setEnabled(bool) - - - theNotJustStart - toggled(bool) - theValue - setEnabled(bool) - - - theUseProfile - toggled(bool) - theNotJustStart - setEnabled(bool) - - - theUseProfile - toggled(bool) - theJustStart - setEnabled(bool) - - - theUseProfile - toggled(bool) - theNotJustStart - setChecked(bool) - - - theDCOPApplications - activated(const TQString&) - EditActionBase - updateOptions() - - - theApplications - activated(const TQString&) - EditActionBase - updateOptions() - - - theUseProfile - toggled(bool) - EditActionBase - updateOptions() - - - theUseDCOP - toggled(bool) - EditActionBase - updateOptions() - - - theChangeMode - toggled(bool) - EditActionBase - updateOptions() - - - theJustStart - toggled(bool) - EditActionBase - updateOptions() - - - theNotJustStart - toggled(bool) - EditActionBase - updateOptions() - - - theUseProfile - toggled(bool) - textLabel5 - setEnabled(bool) - - - theUseDCOP - toggled(bool) - textLabel5_2 - setEnabled(bool) - - - theUseDCOP - toggled(bool) - textLabel4_3 - setEnabled(bool) - - - theUseDCOP - toggled(bool) - textLabel4_2 - setEnabled(bool) - - - theChangeMode - toggled(bool) - textLabel8 - setDisabled(bool) - - - - tabWidget3 - theUseProfile - theApplications - theFunctions - theDCOPApplications - theDCOPObjects - theDCOPFunctions - theModes - theRepeat - theAutoStart - buttonHelp - buttonOk - buttonCancel - - - updateFunctions() - updateApplications() - updateDCOPApplications() - updateDCOPObjects() - updateDCOPFunctions() - updateArguments() - updateArgument(int) - slotParameterChanged() - updateOptions() - - - - klineedit.h - knuminput.h - knuminput.h - knuminput.h - knuminput.h - keditlistbox.h - klineedit.h - - diff --git a/kdelirc/kcmlirc/editmode.cpp b/kdelirc/kcmlirc/editmode.cpp deleted file mode 100644 index a197bb7..0000000 --- a/kdelirc/kcmlirc/editmode.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// -// -// C++ Implementation: $MODULE$ -// -// Description: -// -// -// Author: Gav Wood , (C) 2003 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#include -#include -#include - -#include "editmode.h" - -EditMode::EditMode(TQWidget *parent, const char *name, bool modal, WFlags fl) : EditModeBase(parent, name, modal, fl) -{ - theIcon->setIconType(TDEIcon::Panel, TDEIcon::Any); -} - -EditMode::~EditMode() -{ -} - -void EditMode::slotClearIcon() -{ - theIcon->resetIcon(); -} - -void EditMode::slotCheckText(const TQString &newText) -{ - theOK->setEnabled(!newText.isEmpty()); -} - -#include "editmode.moc" diff --git a/kdelirc/kcmlirc/editmode.h b/kdelirc/kcmlirc/editmode.h deleted file mode 100644 index 5de0836..0000000 --- a/kdelirc/kcmlirc/editmode.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// -// C++ Interface: $MODULE$ -// -// Description: -// -// -// Author: Gav Wood , (C) 2003 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#ifndef EDITMODE_H -#define EDITMODE_H - -#include "editmodebase.h" - -/** -@author Gav Wood -*/ -class EditMode : public EditModeBase -{ - Q_OBJECT - - -public: - void slotCheckText(const TQString &newText); - void slotClearIcon(); - - EditMode(TQWidget *parent = 0, const char *name = 0, bool modal = false, WFlags fl = 0); - ~EditMode(); -}; - -#endif diff --git a/kdelirc/kcmlirc/editmodebase.ui b/kdelirc/kcmlirc/editmodebase.ui deleted file mode 100644 index b59533b..0000000 --- a/kdelirc/kcmlirc/editmodebase.ui +++ /dev/null @@ -1,303 +0,0 @@ - -EditModeBase - - - EditModeBase - - - - 0 - 0 - 461 - 334 - - - - Edit Mode - - - - unnamed - - - - textLabel1 - - - <b>Description</b> - - - - - line3_2 - - - HLine - - - Sunken - - - Horizontal - - - - - layout25 - - - - unnamed - - - - textLabel4 - - - &Icon for system tray: - - - theIcon - - - - - layout24 - - - - unnamed - - - - spacer11 - - - Horizontal - - - Expanding - - - - 110 - 21 - - - - - - theIcon - - - - 5 - 5 - 0 - 0 - - - - - - - - - kPushButton9 - - - - - - image0 - - - - - - - theName - - - false - - - - - textLabel5 - - - &Mode name: - - - theName - - - - - - - spacer4 - - - Horizontal - - - Expanding - - - - 410 - 20 - - - - - - textLabel2 - - - <b>Behavior</b> - - - - - line2 - - - HLine - - - Sunken - - - Horizontal - - - - - theDefault - - - Mo&de is the default for its remote control - - - - - spacer9 - - - Vertical - - - Expanding - - - - 20 - 90 - - - - - - line3 - - - HLine - - - Sunken - - - Horizontal - - - - - layout15 - - - - unnamed - - - - spacer10 - - - Horizontal - - - Expanding - - - - 231 - 20 - - - - - - theOK - - - &OK - - - - - kPushButton8 - - - &Cancel - - - - - - - - - 789c7dd0cd4e84301405e03d4fd17077c438201421c647d0b834312efa03c31d0648745c18e3bbcbb905fc8d0768fa1d202dec12757f77a3925df47c322776ca75e64925fe65185e1f1eafdfa2382b15ce4b95c567517cae9cba9dc606739ae7944ac009cc2a1ce008e6599ee6f2e20016599116c223a88df6da803d589ab22e851d58d9aaae2c7800eba2d67501ee856ea6033d680b5b5ab9db08fd4c0fba8526d02e6c020de8b46d9c065bd06b7fe1850cb612f9f61fd93afaccdad1ef8ec858e74de36cbb7644fb8eb93b60583aa2be3f32b35ca1231ae68c8c8cc3d24d129aab791a3a0ecbc973dbbabc5414cab02e4bb70ecbfef88f3d7f2bb7efe52df4ef7ff9dabd5f451f45248a2d - - - - - theName - textChanged(const TQString&) - EditModeBase - slotCheckText(const TQString&) - - - theOK - clicked() - EditModeBase - accept() - - - kPushButton8 - clicked() - EditModeBase - reject() - - - kPushButton9 - clicked() - EditModeBase - slotClearIcon() - - - - slotCheckText(const TQString &) - slotClearIcon() - - - - kicondialog.h - kpushbutton.h - kpushbutton.h - kpushbutton.h - - diff --git a/kdelirc/kcmlirc/kcmlirc.cpp b/kdelirc/kcmlirc/kcmlirc.cpp deleted file mode 100644 index bf18895..0000000 --- a/kdelirc/kcmlirc/kcmlirc.cpp +++ /dev/null @@ -1,545 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Gav Wood * - * gav@kde.org * - * * - * 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. * - ***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "addaction.h" -#include "newmode.h" -#include "profileserver.h" -#include "remoteserver.h" -#include "kcmlirc.h" -#include "editaction.h" -#include "editmode.h" -#include "modeslist.h" -#include "selectprofile.h" - -typedef KGenericFactory theFactory; -K_EXPORT_COMPONENT_FACTORY(kcmlirc, theFactory("kcmlirc")) - -KCMLirc::KCMLirc(TQWidget *parent, const char *name, TQStringList /*args*/) : DCOPObject("KCMLirc"), TDECModule(parent, name) -{ - TDEGlobal::locale()->insertCatalogue( "kcmlirc" ); - setAboutData(new TDEAboutData("kcmlirc", I18N_NOOP("TDE Lirc"), VERSION, I18N_NOOP("The TDE IR Remote Control System"), TDEAboutData::License_GPL_V2, "Copyright (c)2003 Gav Wood", I18N_NOOP("Use this to configure TDE's infrared remote control system in order to control any TDE application with your infrared remote control."), "http://www.kde.org")); - setButtons(TDECModule::Help); - setQuickHelp(i18n("

Remote Controls

This module allows you to configure bindings between your remote controls and TDE applications. Simply select your remote control and click Add under the Actions/Buttons list. If you want TDE to attempt to automatically assign buttons to a supported application's actions, try clicking the Auto-Populate button.

To view the recognised applications and remote controls, simply select the Loaded Extensions tab.

")); - bool ok; - TDEApplication::kApplication()->dcopClient()->remoteInterfaces("irkick", "IRKick", &ok); - if(!ok) - if(KMessageBox::questionYesNo(this, i18n("The Infrared Remote Control software is not currently running. This configuration module will not work properly without it. Would you like to start it now?"), i18n("Software Not Running"), i18n("Start"), i18n("Do Not Start")) == KMessageBox::Yes) - { kdDebug() << "S" << TDEApplication::startServiceByDesktopName("irkick") << endl; - KSimpleConfig theConfig("irkickrc"); - theConfig.setGroup("General"); - if(theConfig.readBoolEntry("AutoStart", true) == false) - if(KMessageBox::questionYesNo(this, i18n("Would you like the infrared remote control software to start automatically when you begin TDE?"), i18n("Automatically Start?"), i18n("Start Automatically"), i18n("Do Not Start")) == KMessageBox::Yes) - theConfig.writeEntry("AutoStart", true); - } - - TDEApplication::kApplication()->dcopClient()->remoteInterfaces("irkick", "IRKick", &ok); - kdDebug() << "OK" << ok << endl; - - - (new TQHBoxLayout(this))->setAutoAdd(true); - theKCMLircBase = new KCMLircBase(this); - connect(theKCMLircBase->theModes, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateActions() )); - connect(theKCMLircBase->theModes, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateModesStatus(TQListViewItem *) )); - connect(theKCMLircBase->theActions, TQT_SIGNAL( currentChanged(TQListViewItem *) ), this, TQT_SLOT( updateActionsStatus(TQListViewItem *) )); - connect(theKCMLircBase->theExtensions, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateInformation() )); - connect(theKCMLircBase->theModes, TQT_SIGNAL( itemRenamed(TQListViewItem *) ), this, TQT_SLOT( slotRenamed(TQListViewItem *) )); - connect(theKCMLircBase->theModes, TQT_SIGNAL(dropped(TDEListView*, TQDropEvent*, TQListViewItem*, TQListViewItem*)), this, TQT_SLOT(slotDrop(TDEListView*, TQDropEvent*, TQListViewItem*, TQListViewItem*))); - connect((TQObject *)(theKCMLircBase->theAddActions), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddActions() )); - connect((TQObject *)(theKCMLircBase->theAddAction), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddAction() )); - connect((TQObject *)(theKCMLircBase->theEditAction), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEditAction() )); - connect((TQObject *)(theKCMLircBase->theActions), TQT_SIGNAL( doubleClicked(TQListViewItem *) ), this, TQT_SLOT( slotEditAction() )); - connect((TQObject *)(theKCMLircBase->theRemoveAction), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemoveAction() )); - connect((TQObject *)(theKCMLircBase->theAddMode), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddMode() )); - connect((TQObject *)(theKCMLircBase->theEditMode), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEditMode() )); - connect((TQObject *)(theKCMLircBase->theRemoveMode), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemoveMode() )); - load(); -} - -KCMLirc::~KCMLirc() -{ -} - -void KCMLirc::updateModesStatus(TQListViewItem *item) -{ - theKCMLircBase->theModes->setItemsRenameable(item && item->parent()); - theKCMLircBase->theAddActions->setEnabled(ProfileServer::profileServer()->profiles().count() && theKCMLircBase->theModes->selectedItem() && RemoteServer::remoteServer()->remotes()[modeMap[theKCMLircBase->theModes->selectedItem()].remote()]); - theKCMLircBase->theAddAction->setEnabled(item); - theKCMLircBase->theAddMode->setEnabled(item); - theKCMLircBase->theRemoveMode->setEnabled(item && item->parent()); - theKCMLircBase->theEditMode->setEnabled(item); -} - -void KCMLirc::updateActionsStatus(TQListViewItem *item) -{ - theKCMLircBase->theRemoveAction->setEnabled(item); - theKCMLircBase->theEditAction->setEnabled(item); -} - -void KCMLirc::slotRenamed(TQListViewItem *item) -{ - if(!item) return; - - if(item->parent() && item->text(0) != modeMap[item].name()) - { allActions.renameMode(modeMap[item], item->text(0)); - allModes.rename(modeMap[item], item->text(0)); - emit changed(true); - updateModes(); - } -} - -void KCMLirc::slotEditAction() -{ - if(!theKCMLircBase->theActions->currentItem()) return; - - EditAction theDialog(actionMap[theKCMLircBase->theActions->currentItem()], this); - TQListViewItem *item = theKCMLircBase->theModes->currentItem(); - if(item->parent()) item = item->parent(); - theDialog.theModes->insertItem(i18n("[Exit current mode]")); - for(item = item->firstChild(); item; item = item->nextSibling()) - theDialog.theModes->insertItem(item->text(0)); - theDialog.readFrom(); - if(theDialog.exec() == TQDialog::Accepted) { theDialog.writeBack(); emit changed(true); updateActions(); } -} - -void KCMLirc::slotAddActions() -{ - if(!theKCMLircBase->theModes->selectedItem()) return; - Mode m = modeMap[theKCMLircBase->theModes->selectedItem()]; - if(!RemoteServer::remoteServer()->remotes()[m.remote()]) return; - - SelectProfile theDialog(this, 0); - - TQMap profileMap; - TQDict dict = ProfileServer::profileServer()->profiles(); - for(TQDictIterator i(dict); i.current(); ++i) profileMap[new TQListViewItem(theDialog.theProfiles, i.current()->name())] = i.current(); - - if(theDialog.exec() == TQDialog::Accepted && theDialog.theProfiles->currentItem()) - { autoPopulate(*(profileMap[theDialog.theProfiles->currentItem()]), *(RemoteServer::remoteServer()->remotes()[m.remote()]), m.name()); - updateActions(); - emit changed(true); - } -} - -void KCMLirc::slotAddAction() -{ - kdDebug() << k_funcinfo << endl; - if(!theKCMLircBase->theModes->selectedItem()) return; - Mode m = modeMap[theKCMLircBase->theModes->selectedItem()]; - - AddAction theDialog(this, 0, m); - connect(this, TQT_SIGNAL(haveButton(const TQString &, const TQString &)), &theDialog, TQT_SLOT(updateButton(const TQString &, const TQString &))); - - // populate the modes list box - TQListViewItem *item = theKCMLircBase->theModes->selectedItem(); - if(item->parent()) item = item->parent(); - theDialog.theModes->setEnabled(item->firstChild()); - theDialog.theSwitchMode->setEnabled(item->firstChild()); - for(item = item->firstChild(); item; item = item->nextSibling()) - { TDEListViewItem *a = new TDEListViewItem(theDialog.theModes, item->text(0)); - if(item->isSelected()) { a->setSelected(true); theDialog.theModes->setCurrentItem(a); } - } - - if(theDialog.exec() == TQDialog::Accepted && theDialog.theButtons->selectedItem()) - { IRAction a; - a.setRemote(m.remote()); - a.setMode(m.name()); - a.setButton(theDialog.buttonMap[theDialog.theButtons->selectedItem()]); - a.setRepeat(theDialog.theRepeat->isChecked()); - a.setAutoStart(theDialog.theAutoStart->isChecked()); - a.setDoBefore(theDialog.theDoBefore->isChecked()); - a.setDoAfter(theDialog.theDoAfter->isChecked()); - a.setUnique(theDialog.isUnique); - a.setIfMulti(theDialog.theDontSend->isChecked() ? IM_DONTSEND : theDialog.theSendToTop->isChecked() ? IM_SENDTOTOP : theDialog.theSendToBottom->isChecked() ? IM_SENDTOBOTTOM : IM_SENDTOALL); - // change mode? - if(theDialog.theChangeMode->isChecked()) - { - if(theDialog.theSwitchMode->isChecked() && theDialog.theModes->selectedItem()) - { - a.setProgram(""); - a.setObject(theDialog.theModes->selectedItem()->text(0)); - } - else if(theDialog.theExitMode->isChecked()) - { - a.setProgram(""); - a.setObject(""); - } - a.setAutoStart(false); - a.setRepeat(false); - } - // DCOP? - else if(theDialog.theUseDCOP->isChecked() && theDialog.theObjects->selectedItem() && theDialog.theObjects->selectedItem()->parent() && theDialog.theFunctions->selectedItem()) - { - a.setProgram(theDialog.program); - a.setObject(theDialog.theObjects->selectedItem()->text(0)); - a.setMethod(theDialog.theFunctions->selectedItem()->text(2)); - theDialog.theParameters->setSorting(3); - a.setArguments(theDialog.theArguments); - } - // profile? - else if(theDialog.theUseProfile->isChecked() && theDialog.theProfiles->selectedItem() && (theDialog.theProfileFunctions->selectedItem() || theDialog.theJustStart->isChecked())) - { - ProfileServer *theServer = ProfileServer::profileServer(); - - if(theDialog.theNotJustStart->isChecked()) - { const ProfileAction *theAction = theServer->getAction(theDialog.profileMap[theDialog.theProfiles->selectedItem()], theDialog.profileFunctionMap[theDialog.theProfileFunctions->selectedItem()]); - a.setProgram(theAction->profile()->id()); - a.setObject(theAction->objId()); - a.setMethod(theAction->prototype()); - theDialog.theParameters->setSorting(3); - a.setArguments(theDialog.theArguments); - } - else - { a.setProgram(theServer->profiles()[theDialog.profileMap[theDialog.theProfiles->selectedItem()]]->id()); - a.setObject(""); - } - } - - // save our new action - allActions.addAction(a); - updateActions(); - emit changed(true); - } -} - -void KCMLirc::slotRemoveAction() -{ - if(!theKCMLircBase->theActions->currentItem()) return; - - IRAIt i = actionMap[theKCMLircBase->theActions->currentItem()]; - allActions.erase(i); - updateActions(); - emit changed(true); -} - -void KCMLirc::autoPopulate(const Profile &profile, const Remote &remote, const TQString &mode) -{ - TQDict d = remote.buttons(); - for(TQDictIterator i(d); i.current(); ++i) - { const ProfileAction *pa = profile.searchClass(i.current()->getClass()); - if(pa) - { - IRAction a; - a.setRemote(remote.id()); - a.setMode(mode); - a.setButton(i.current()->id()); - a.setRepeat(pa->repeat()); - a.setAutoStart(pa->autoStart()); - a.setProgram(pa->profile()->id()); - a.setObject(pa->objId()); - a.setMethod(pa->prototype()); - a.setUnique(pa->profile()->unique()); - a.setIfMulti(pa->profile()->ifMulti()); - Arguments l; - // argument count should be either 0 or 1. undefined if > 1. - if(Prototype(pa->prototype()).argumentCount() == 1) - { - l.append(TQString(TQString().setNum(i.current()->parameter().toFloat() * pa->multiplier()))); - l.back().cast(TQVariant::nameToType(Prototype(pa->prototype()).type(0).utf8())); - } - a.setArguments(l); - allActions.addAction(a); - } - } -} - -void KCMLirc::slotAddMode() -{ - if(!theKCMLircBase->theModes->selectedItem()) return; - - NewMode theDialog(this, 0); - TQMap remoteMap; - TQListViewItem *tr = theKCMLircBase->theModes->selectedItem(); - if(tr) if(tr->parent()) tr = tr->parent(); - for(TQListViewItem *i = theKCMLircBase->theModes->firstChild(); i; i = i->nextSibling()) - { TDEListViewItem *a = new TDEListViewItem(theDialog.theRemotes, i->text(0)); - remoteMap[a] = modeMap[i].remote(); - if(i == tr) { a->setSelected(true); theDialog.theRemotes->setCurrentItem(a); } - } - if(theDialog.exec() == TQDialog::Accepted && theDialog.theRemotes->selectedItem() && !theDialog.theName->text().isEmpty()) - { - allModes.add(Mode(remoteMap[theDialog.theRemotes->selectedItem()], theDialog.theName->text())); - updateModes(); - emit changed(true); - } -} - -void KCMLirc::slotEditMode() -{ - if(!theKCMLircBase->theModes->selectedItem()) return; - - EditMode theDialog(this, 0); - - Mode &mode = modeMap[theKCMLircBase->theModes->selectedItem()]; - theDialog.theName->setEnabled(theKCMLircBase->theModes->selectedItem()->parent()); - theDialog.theName->setText(mode.name().isEmpty() ? mode.remoteName() : mode.name()); - if(!mode.iconFile().isNull()) - theDialog.theIcon->setIcon(mode.iconFile()); - else - theDialog.theIcon->resetIcon(); - theDialog.theDefault->setChecked(allModes.isDefault(mode)); - theDialog.theDefault->setEnabled(!allModes.isDefault(mode)); - - if(theDialog.exec() == TQDialog::Accepted) - { kdDebug() << "Setting icon : " << theDialog.theIcon->icon() << endl; - mode.setIconFile(theDialog.theIcon->icon().isEmpty() ? TQString() : theDialog.theIcon->icon()); - allModes.updateMode(mode); - if(!mode.name().isEmpty()) - { allActions.renameMode(mode, theDialog.theName->text()); - allModes.rename(mode, theDialog.theName->text()); - } - if(theDialog.theDefault->isChecked()) allModes.setDefault(mode); - emit changed(true); - updateModes(); - } -} - -void KCMLirc::slotRemoveMode() -{ - if(!theKCMLircBase->theModes->selectedItem()) return; - if(!theKCMLircBase->theModes->selectedItem()->parent()) return; - - if(KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to remove %1 and all its actions?").arg(theKCMLircBase->theModes->selectedItem()->text(0)), i18n("Erase Actions?")) == KMessageBox::Continue) - { - allModes.erase(modeMap[theKCMLircBase->theModes->selectedItem()]); - updateModes(); - emit changed(true); - } -} - -void KCMLirc::slotSetDefaultMode() -{ - if(!theKCMLircBase->theModes->selectedItem()) return; - allModes.setDefault(modeMap[theKCMLircBase->theModes->selectedItem()]); - updateModes(); - emit changed(true); -} - -void KCMLirc::slotDrop(TDEListView *, TQDropEvent *, TQListViewItem *, TQListViewItem *after) -{ - Mode m = modeMap[after]; - - if(modeMap[theKCMLircBase->theModes->selectedItem()].remote() != m.remote()) - { - KMessageBox::error(this, i18n("You may only drag the selected items onto a mode of the same remote control"), i18n("You May Not Drag Here")); - return; - } - for(TQListViewItem *i = theKCMLircBase->theActions->firstChild(); i; i = i->nextSibling()) - if(i->isSelected()) - (*(actionMap[i])).setMode(m.name()); - - updateActions(); - emit changed(true); -} - -void KCMLirc::updateActions() -{ - IRAIt oldCurrent; - if(theKCMLircBase->theActions->selectedItem()) oldCurrent = actionMap[theKCMLircBase->theActions->selectedItem()]; - - theKCMLircBase->theActions->clear(); - actionMap.clear(); - - if(!theKCMLircBase->theModes->selectedItem()) { updateActionsStatus(0); return; } - - Mode m = modeMap[theKCMLircBase->theModes->selectedItem()]; - theKCMLircBase->theModeLabel->setText(m.remoteName() + ": " + (m.name().isEmpty() ? i18n("Actions always available") : i18n("Actions available only in mode %1").arg(m.name()))); - IRAItList l = allActions.findByMode(m); - for(IRAItList::iterator i = l.begin(); i != l.end(); ++i) - { TQListViewItem *b = new TDEListViewItem(theKCMLircBase->theActions, (**i).buttonName(), (**i).application(), (**i).function(), (**i).arguments().toString(), (**i).notes()); - actionMap[b] = *i; - if(*i == oldCurrent) { b->setSelected(true); theKCMLircBase->theActions->setCurrentItem(b); } - } - - if(theKCMLircBase->theActions->currentItem()) - theKCMLircBase->theActions->currentItem()->setSelected(true); - updateActionsStatus(theKCMLircBase->theActions->currentItem()); -} - -void KCMLirc::gotButton(TQString remote, TQString button) -{ - emit haveButton(remote, button); -} - -void KCMLirc::updateModes() -{ - Mode oldCurrent; - if(theKCMLircBase->theModes->selectedItem()) oldCurrent = modeMap[theKCMLircBase->theModes->selectedItem()]; - - theKCMLircBase->theModes->clear(); - modeMap.clear(); - - IRKick_stub IRKick("irkick", "IRKick"); - TQStringList remotes = IRKick.remotes(); - if(remotes.begin() == remotes.end()) - theKCMLircBase->theMainLabel->setMaximumSize(32767, 32767); - else - theKCMLircBase->theMainLabel->setMaximumSize(0, 0); - for(TQStringList::iterator i = remotes.begin(); i != remotes.end(); ++i) - { Mode mode = allModes.getMode(*i, ""); - TQListViewItem *a = new TDEListViewItem(theKCMLircBase->theModes, RemoteServer::remoteServer()->getRemoteName(*i), allModes.isDefault(mode) ? "Default" : "", mode.iconFile().isNull() ? "" : ""); - if(!mode.iconFile().isNull()) - a->setPixmap(2, TDEIconLoader().loadIcon(mode.iconFile(), TDEIcon::Panel)); - modeMap[a] = mode; // the null mode - if(modeMap[a] == oldCurrent) { a->setSelected(true); theKCMLircBase->theModes->setCurrentItem(a); } - a->setOpen(true); - ModeList l = allModes.getModes(*i); - for(ModeList::iterator j = l.begin(); j != l.end(); ++j) - if(!(*j).name().isEmpty()) - { TQListViewItem *b = new TDEListViewItem(a, (*j).name(), allModes.isDefault(*j) ? i18n("Default") : "", (*j).iconFile().isNull() ? "" : ""); - if(!(*j).iconFile().isNull()) - b->setPixmap(2, TDEIconLoader().loadIcon((*j).iconFile(), TDEIcon::Panel)); - modeMap[b] = *j; - if(*j == oldCurrent) { b->setSelected(true); theKCMLircBase->theModes->setCurrentItem(b); } - } - } - if(theKCMLircBase->theModes->currentItem()) - theKCMLircBase->theModes->currentItem()->setSelected(true); - updateModesStatus(theKCMLircBase->theModes->currentItem()); - updateActions(); -} - -void KCMLirc::updateExtensions() -{ - theKCMLircBase->theExtensions->clear(); - - { ProfileServer *theServer = ProfileServer::profileServer(); - TQListViewItem *a = new TQListViewItem(theKCMLircBase->theExtensions, i18n("Applications")); - a->setOpen(true); - profileMap.clear(); - TQDict dict = theServer->profiles(); - TQDictIterator i(dict); - for(; i.current(); ++i) - profileMap[new TQListViewItem(a, i.current()->name())] = i.currentKey(); - } - { RemoteServer *theServer = RemoteServer::remoteServer(); - TQListViewItem *a = new TQListViewItem(theKCMLircBase->theExtensions, i18n("Remote Controls")); - a->setOpen(true); - remoteMap.clear(); - TQDict dict = theServer->remotes(); - TQDictIterator i(dict); - for(; i.current(); ++i) - remoteMap[new TQListViewItem(a, i.current()->name())] = i.currentKey(); - } - updateInformation(); -} - -void KCMLirc::updateInformation() -{ - theKCMLircBase->theInformation->clear(); - theKCMLircBase->theInformationLabel->setText(""); - - if(!theKCMLircBase->theExtensions->selectedItem()) return; - - if(!theKCMLircBase->theExtensions->selectedItem()->parent()) - { - theKCMLircBase->theInformationLabel->setText(i18n("Information on %1:").arg(theKCMLircBase->theExtensions->selectedItem()->text(0))); - if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Applications")) - new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Applications"), TQString().setNum(theKCMLircBase->theExtensions->selectedItem()->childCount())); - else if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Remote Controls")) - new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Remote Controls"), TQString().setNum(theKCMLircBase->theExtensions->selectedItem()->childCount())); - } - else if(theKCMLircBase->theExtensions->selectedItem()->parent()->text(0) == i18n("Applications")) - { - ProfileServer *theServer = ProfileServer::profileServer(); - const Profile *p = theServer->profiles()[profileMap[theKCMLircBase->theExtensions->selectedItem()]]; - new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Name"), p->name()); - new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author()); - new TQListViewItem(theKCMLircBase->theInformation, i18n("Application Identifier"), p->id()); - new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Actions"), TQString().setNum(p->actions().count())); - theKCMLircBase->theInformationLabel->setText(i18n("Information on %1:").arg(p->name())); - } - else if(theKCMLircBase->theExtensions->selectedItem()->parent()->text(0) == i18n("Remote Controls")) - { - RemoteServer *theServer = RemoteServer::remoteServer(); - const Remote *p = theServer->remotes()[remoteMap[theKCMLircBase->theExtensions->selectedItem()]]; - new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Name"), p->name()); - new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author()); - new TQListViewItem(theKCMLircBase->theInformation, i18n("Remote Control Identifier"), p->id()); - new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Buttons"), TQString().setNum(p->buttons().count())); - theKCMLircBase->theInformationLabel->setText(i18n("Information on %1:").arg(p->name())); - } -} - -void KCMLirc::load() -{ - KSimpleConfig theConfig("irkickrc"); - allActions.loadFromConfig(theConfig); - allModes.loadFromConfig(theConfig); - allModes.generateNulls(IRKick_stub("irkick", "IRKick").remotes()); - - updateExtensions(); - updateModes(); - updateActions(); -} - -void KCMLirc::defaults() -{ - // insert your default settings code here... - emit changed(true); -} - -void KCMLirc::save() -{ - KSimpleConfig theConfig("irkickrc"); - allActions.saveToConfig(theConfig); - allModes.saveToConfig(theConfig); - - theConfig.sync(); - IRKick_stub("irkick", "IRKick").reloadConfiguration(); - - emit changed(true); -} - -void KCMLirc::configChanged() -{ - // insert your saving code here... - emit changed(true); -} - -// TODO: Take this out when I know how -extern "C" -{ - KDE_EXPORT TDECModule *create_kcmlirc(TQWidget *parent, const char *) - { TDEGlobal::locale()->insertCatalogue("kcmlirc"); - return new KCMLirc(parent, "KCMLirc"); - } -} - -#include - -#include "kcmlirc.moc" diff --git a/kdelirc/kcmlirc/kcmlirc.desktop b/kdelirc/kcmlirc/kcmlirc.desktop deleted file mode 100644 index 09033c1..0000000 --- a/kdelirc/kcmlirc/kcmlirc.desktop +++ /dev/null @@ -1,119 +0,0 @@ -[Desktop Entry] -Icon=irkick -Comment=Configure your remote controls for use with applications -Comment[ar]=إعداد التحكّم عن بعد لاستخدامه في تطبيقاتك -Comment[bg]=Настройване на дистанционното управление -Comment[bs]=Podesite vaš daljinski upravljač za upotrebu sa programima -Comment[ca]=Configura els teus controls remots per usar amb aplicacions -Comment[cs]=Nastavení dálkových ovladačů -Comment[cy]=Ffurfweddu eich rheolyddion pell ar gyfer ddefnydd efo cymhwysiadau -Comment[da]=Indstil dine fjernbetjeninger til brug for programmer -Comment[de]=Einrichtung diverser Applikationen zur Bedienung mit einer Fernsteuerung -Comment[el]=Ρυθμίστε τα τηλεχειριστήρια σας για χρήση σε εφαρμογές -Comment[es]=Configurar sus controles remotos para usarlos en las aplicaciones -Comment[et]=Kaugjuhtimise seadistamine rakenduste jaoks -Comment[eu]=Konfiguratu zure urruneko kontrolak aplikazioekin erabiltzeko -Comment[fa]=برای استفاده با کاربردها، کنترلهای از راه دورتان را پیکربندی کنید -Comment[fi]=Muokkaa kauko-ohjaimesi toimimaan ohjelmien kanssa -Comment[fr]=Configurer vos contrôleurs distants pour l'utiliser avec vos applications -Comment[ga]=Cumraigh do chuid cianrialtáin chun iad a úsáid le feidhmchláir -Comment[he]=הגדרת שלט רחוק לשימוש ביישומים -Comment[hi]=अनुप्रयोगों के साथ उपयोग के लिए अपने रिमोट नियंत्रण को कॉन्फ़िगर करें -Comment[hu]=Az infravörös távirányítók jellemzői -Comment[is]=Her má stilla fjarstýringar ýmissa forrita -Comment[it]=Configura i telecomandi per l'uso con le applicazioni -Comment[ja]=アプリケーションで使用するリモートコントロールを設定 -Comment[ka]=დააკონფიგურირეთ თქვენი დაშორებული მართვა ამ პროგრამით -Comment[kk]=Қашықтан басқаруды қолданбалармен қолдану үшін баптау -Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​ការបញ្ជា​ពី​ចម្ងាយ​របស់​អ្នក សម្រាប់​ការប្រើ​ជាមួយនឹង​កម្មវិធី -Comment[lt]=Nuotolinio valdymo programomis konfigūravimas -Comment[mk]=Конфигурирајте ги вашите далечински управувачи за користење со апликации -Comment[nb]=Sett opp fjernkontroll for bruk mot programmer -Comment[nds]=Feernbedeners för den Bruuk mit Programmen instellen -Comment[ne]=अनुप्रयोगसँग प्रयोग गर्न तपाईंको टाढाको नियन्त्रण कन्फिगर गर्नुहोस् -Comment[nl]=Uw afstandsbedieningen instellen voor gebruik in TDE -Comment[nn]=Set opp bruken av fjernkontroll i ulike program -Comment[pa]=ਕਾਰਜਾਂ ਨਾਲ ਵਰਤਣ ਲਈ ਆਪਣੇ ਰਿਮੋਟ ਕੰਟਰੋਲ ਦੀ ਸੰਰਚਨਾ ਕਰੋ -Comment[pl]=Konfiguruje piloty do użycia w programach -Comment[pt]=Configure os seus comandos à distância para os usar nas aplicações -Comment[pt_BR]=Configura seus controles remotos para o uso com as aplicações -Comment[ro]=Configurează telecomneziile de utilizat cu aplicaţii -Comment[ru]=Настройка удалённого управления приложениями -Comment[sk]=Nastavenie diaľkového ovládania pre vaše aplikácie -Comment[sl]=Nastavite vaš daljinski upravljalnik za uporabo v programih -Comment[sr]=Подесите контроле вашег даљинског управљача за употребу у програмима -Comment[sr@Latn]=Podesite kontrole vašeg daljinskog upravljača za upotrebu u programima -Comment[sv]=Ställ in fjärrkontroller att använda med program -Comment[ta]=பயன்பாடுகளுடன் பயன்படுத்த தொலைதூர கட்டுப்பாடுகளை வடிவமை -Comment[tg]=Ба воситаи замимаҳо танзимкунии идоракунии дурдасти шумо -Comment[tr]=Uzaktan kontrol ayarlarınızı uygulamalarla kullanmak için ayarla -Comment[uk]=Налаштування елементів дистанційного керування для використання з програмами -Comment[zh_CN]=配置您的远程控制以供应用程序使用 -Comment[zh_TW]=設定遙控按鍵與應用程式的關聯 -Exec=tdecmshell kcmlirc -Keywords=KCMLirc,kcmlirc -Keywords[bg]=дистанционно устройство, дистанционно, инфрачервени, лъчи, KCMLirc, kcmlirc -Keywords[nl]=kcmlirc,linux infrarood,infrarood,afstandsbediening -Keywords[pl]=KCMLirc,kcmlirc,piloty,podczerwień -Keywords[pt]=kcmlirc -Keywords[ta]= KCMLirc,kcmlirc -Keywords[uz]=KCMLirc,kcmlirc,infraqizil nur -Keywords[uz@cyrillic]=KCMLirc,kcmlirc,инфрақизил нур -Name=Remote Controls -Name[ar]=التحكّم عن بعد -Name[bg]=Дистанционно -Name[bs]=Daljinsko upravljanje -Name[ca]=Controls remots -Name[cs]=Dálková ovládání -Name[cy]=Rheolyddion Pell -Name[da]=Fjernbetjeninger -Name[de]=Fernsteuerungen -Name[el]=Τηλεχειριστήρια -Name[eo]=Teleregiloj -Name[es]=Controles remotos -Name[et]=Kaugjuhtimine -Name[eu]=Urruneko Aginteak -Name[fa]=کنترلهای از راه دور -Name[fi]=Kauko-ohjaimet -Name[fr]=Contrôleurs distants -Name[ga]=Cianrialtáin -Name[he]=שליטה מרחוק -Name[hi]=रिमोट नियंत्रण -Name[hu]=Távirányító -Name[is]=Fjarstýringar -Name[it]=Telecomandi -Name[ja]=リモートコントロール -Name[ka]=დაშორებული მართვა -Name[kk]=Қашықтан басқару -Name[km]=បញ្ជា​ពី​ចម្ងាយ -Name[lt]=Nuotolinis valdymas -Name[mk]=Далечински управувачи -Name[nb]=Fjernkontroll -Name[nds]=Feernbedeners -Name[ne]=टाढाको नियन्त्रण -Name[nl]=Afstandsbediening -Name[nn]=Fjernkontrollar -Name[pa]=ਰਿਮੋਟ ਕੰਟਰੋਲ -Name[pl]=Piloty -Name[pt]=Comandos à Distância -Name[pt_BR]=Controles Remotos -Name[ro]=Telecomenzi -Name[ru]=Удалённое управление -Name[sk]=Diaľkový ovládač -Name[sl]=Daljinski upravljalci -Name[sr]=Даљински управљачи -Name[sr@Latn]=Daljinski upravljači -Name[sv]=Fjärrkontroller -Name[ta]= தொலைதூர கட்டுப்பாடுகள் -Name[tg]=Идоракунии Дурдаст -Name[tr]=Uzaktan Kontroller -Name[uk]=Елементи дистанційного керування -Name[zh_CN]=远程控制 -Name[zh_TW]=遙控鍵 -Terminal=false -Type=Application -X-TDE-FactoryName=kcmlirc -X-TDE-Library=kcmlirc -X-TDE-ModuleType=Library -DocPath=kcmlirc/index.html -Categories=Qt;TDE;X-TDE-settings-peripherals; diff --git a/kdelirc/kcmlirc/kcmlirc.h b/kdelirc/kcmlirc/kcmlirc.h deleted file mode 100644 index 207c995..0000000 --- a/kdelirc/kcmlirc/kcmlirc.h +++ /dev/null @@ -1,85 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Gav Wood * - * gav@kde.org - * * - * 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. * - ***************************************************************************/ - -#ifndef _KCMLIRC_H_ -#define _KCMLIRC_H_ - -#include -#include - -#include - -#include - -#include "kcmlircbase.h" -#include "iractions.h" -#include "modes.h" - -class TQListViewItem; -class TDEListView; -class TQDropEvent; -class Profile; -class Remote; - -class KCMLirc: public TDECModule, virtual public DCOPObject -{ - Q_OBJECT -// - K_DCOP - -private: - KCMLircBase *theKCMLircBase; - IRActions allActions; - Modes allModes; - TQMap actionMap; - TQMap modeMap; - TQMap profileMap, remoteMap; - - void autoPopulate(const Profile &profile, const Remote &remote, const TQString &mode); - -public slots: - void updateActions(); - void updateModesStatus(TQListViewItem *); - void updateActionsStatus(TQListViewItem *); - void updateModes(); - void updateExtensions(); - void updateInformation(); - void slotAddMode(); - void slotRemoveMode(); - void slotSetDefaultMode(); - void slotAddAction(); - void slotAddActions(); - void slotEditAction(); - void slotRemoveAction(); - void slotDrop(TDEListView *, TQDropEvent *, TQListViewItem *, TQListViewItem *after); - void slotRenamed(TQListViewItem *item); - void slotEditMode(); - -#ifndef Q_MOC_RUN -// MOC_SKIP_BEGIN -k_dcop: -// MOC_SKIP_END -#endif - // now just used as a proxy to AddAction class - virtual void gotButton(TQString remote, TQString button); -signals: - void haveButton(const TQString &remote, const TQString &button); - -public: - virtual void load(); - virtual void save(); - virtual void defaults(); - virtual void configChanged(); - - KCMLirc(TQWidget *parent = 0, const char *name = 0, TQStringList args = TQStringList()); - ~KCMLirc(); -}; - -#endif diff --git a/kdelirc/kcmlirc/kcmlircbase.ui b/kdelirc/kcmlirc/kcmlircbase.ui deleted file mode 100644 index b5b21bf..0000000 --- a/kdelirc/kcmlirc/kcmlircbase.ui +++ /dev/null @@ -1,506 +0,0 @@ - -KCMLircBase -Gav Wood - - - KCMLircBase - - - - 0 - 0 - 469 - 326 - - - - Linux Infrared Remote Control - - - - unnamed - - - 0 - - - - tabWidget2 - - - 0 - - - - tab - - - Controller Functions - - - - unnamed - - - - theMainLabel - - - - 5 - 0 - 0 - 0 - - - - - 138 - 0 - 0 - - - - - 1 - - - - NoFrame - - - 1 - - - There are currently no remote controls available. You must first set up LIRC correctly; see www.lirc.org for more information. - - - WordBreak|AlignTop - - - - - splitter4 - - - Horizontal - - - - modeLayout - - - - unnamed - - - 0 - - - - theRemotesLabel - - - Remote controls and modes: - - - - - - New Column - - - true - - - true - - - - - New Column - - - true - - - true - - - - theModes - - - true - - - true - - - true - - - - - modeButtonLayout - - - - unnamed - - - - spacer6 - - - Horizontal - - - Expanding - - - - 17 - 20 - - - - - - theAddMode - - - false - - - &Add... - - - - - theEditMode - - - false - - - &Edit... - - - - - theRemoveMode - - - false - - - &Remove - - - - - - - - - layout9 - - - - unnamed - - - 0 - - - - theModeLabel - - - - - - - - - Button - - - true - - - true - - - - - Program - - - true - - - true - - - - - Function - - - true - - - true - - - - - Options - - - true - - - true - - - - - Notes - - - true - - - true - - - - theActions - - - - 7 - 7 - 2 - 0 - - - - true - - - FileManager - - - true - - - - - layout7 - - - - unnamed - - - - spacer1 - - - Horizontal - - - Expanding - - - - 240 - 21 - - - - - - layout6 - - - - unnamed - - - - theAddActions - - - false - - - Auto-Populate... - - - - - - - - theAddAction - - - false - - - A&dd... - - - - - theEditAction - - - false - - - Ed&it... - - - - - theRemoveAction - - - false - - - Re&move - - - - - - - - - - - - - - tab - - - Loaded Extensions - - - - unnamed - - - - splitter5 - - - Horizontal - - - - - Name - - - true - - - true - - - - theExtensions - - - true - - - true - - - - - layout9 - - - - unnamed - - - 0 - - - - theInformationLabel - - - - - - - - - Name - - - true - - - true - - - - - Information - - - true - - - true - - - - theInformation - - - true - - - - - - - - - - - - kcmlircbase.ui.h - - - init() - - - - tdelistview.h - kpushbutton.h - kpushbutton.h - kpushbutton.h - tdelistview.h - kpushbutton.h - kpushbutton.h - kpushbutton.h - tdelistview.h - tdelistview.h - - diff --git a/kdelirc/kcmlirc/kcmlircbase.ui.h b/kdelirc/kcmlirc/kcmlircbase.ui.h deleted file mode 100644 index dcf2ec3..0000000 --- a/kdelirc/kcmlirc/kcmlircbase.ui.h +++ /dev/null @@ -1,37 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Gav Wood * - * gav@kde.org * - * * - * 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. * - ***************************************************************************/ - -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you wish to add, delete or rename functions or slots use -** TQt Designer which will update this file, preserving your code. Create an -** init() function in place of a constructor, and a destroy() function in -** place of a destructor. -*****************************************************************************/ - -#include "modeslist.h" - -void KCMLircBase::init() -{ - delete theModes; - modeLayout->removeItem(modeButtonLayout); - theModes = new ModesList(TQT_TQWIDGET(modeLayout->parent()), "theModes"); - theModes->addColumn(i18n("Remote Control")); - theModes->addColumn(i18n("Default")); - theModes->addColumn(i18n("Icon")); - theModes->setAcceptDrops(true); - theModes->setRootIsDecorated(true); - theModes->setItemsRenameable(true); - modeLayout->addWidget(theModes); - modeLayout->addLayout(modeButtonLayout); - modeLayout->invalidate(); - modeLayout->activate(); -} diff --git a/kdelirc/kcmlirc/modeslist.cpp b/kdelirc/kcmlirc/modeslist.cpp deleted file mode 100644 index 1665e64..0000000 --- a/kdelirc/kcmlirc/modeslist.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// -// -// C++ Implementation: $MODULE$ -// -// Description: -// -// -// Author: Gav Wood , (C) 2003 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#include - -#include - -#include "modeslist.h" - -ModesList::ModesList(TQWidget *parent, const char *name) : TDEListView(parent, name) -{ - setAcceptDrops(true); - setDropVisualizer(false); - setDropHighlighter(true); -} - -bool ModesList::acceptDrag(TQDropEvent *) const -{ - // TODO: make safer by checking source/mime type - // TODO: make safer by only allowing drops on the correct remote control's modes - return true; -} - -#include "modeslist.moc" diff --git a/kdelirc/kcmlirc/modeslist.h b/kdelirc/kcmlirc/modeslist.h deleted file mode 100644 index d6a4b25..0000000 --- a/kdelirc/kcmlirc/modeslist.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// -// C++ Interface: $MODULE$ -// -// Description: -// -// -// Author: Gav Wood , (C) 2003 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#ifndef MODESLIST_H -#define MODESLIST_H - -#include - -#include - -/** - -@author Gav Wood -*/ - -class ModesList : public TDEListView -{ - Q_OBJECT - -public: - virtual bool acceptDrag(TQDropEvent *) const; - ModesList(TQWidget *parent = 0, const char *name = 0); -}; - -#endif diff --git a/kdelirc/kcmlirc/newmode.ui b/kdelirc/kcmlirc/newmode.ui deleted file mode 100644 index 811b493..0000000 --- a/kdelirc/kcmlirc/newmode.ui +++ /dev/null @@ -1,158 +0,0 @@ - -NewMode - - - NewMode - - - - 0 - 0 - 309 - 341 - - - - New Mode - - - - unnamed - - - - - Remote Controls - - - true - - - true - - - - theRemotes - - - true - - - - - layout11 - - - - unnamed - - - - textLabel5 - - - Name: - - - - - theName - - - - - - - line2 - - - HLine - - - Sunken - - - Horizontal - - - - - layout12 - - - - unnamed - - - - spacer7 - - - Horizontal - - - Expanding - - - - 61 - 21 - - - - - - kPushButton6 - - - false - - - &OK - - - - - kPushButton5 - - - &Cancel - - - - - - - - - kPushButton6 - clicked() - NewMode - accept() - - - kPushButton5 - clicked() - NewMode - reject() - - - theName - textChanged(const TQString&) - NewMode - slotTextChanged(const TQString&) - - - - newmode.ui.h - - - slotTextChanged( const TQString & newText ) - - - - tdelistview.h - kpushbutton.h - kpushbutton.h - - diff --git a/kdelirc/kcmlirc/newmode.ui.h b/kdelirc/kcmlirc/newmode.ui.h deleted file mode 100644 index 29c4166..0000000 --- a/kdelirc/kcmlirc/newmode.ui.h +++ /dev/null @@ -1,24 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Gav Wood * - * gav@kde.org * - * * - * 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. * - ***************************************************************************/ - -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you wish to add, delete or rename functions or slots use -** TQt Designer which will update this file, preserving your code. Create an -** init() function in place of a constructor, and a destroy() function in -** place of a destructor. -*****************************************************************************/ - - -void NewMode::slotTextChanged( const TQString &newText ) -{ - kPushButton6->setEnabled(newText != ""); -} diff --git a/kdelirc/kcmlirc/selectprofile.ui b/kdelirc/kcmlirc/selectprofile.ui deleted file mode 100644 index 911deb4..0000000 --- a/kdelirc/kcmlirc/selectprofile.ui +++ /dev/null @@ -1,128 +0,0 @@ - -SelectProfile - - - SelectProfile - - - - 0 - 0 - 263 - 328 - - - - Select Profile to Add - - - - unnamed - - - - - Profile Name - - - true - - - true - - - - theProfiles - - - true - - - - - line8 - - - HLine - - - Sunken - - - Horizontal - - - - - layout47 - - - - unnamed - - - - spacer53 - - - Horizontal - - - Expanding - - - - 40 - 20 - - - - - - kPushButton12 - - - true - - - &OK - - - true - - - - - kPushButton13 - - - &Cancel - - - - - - - - - - - kPushButton12 - clicked() - SelectProfile - accept() - - - kPushButton13 - clicked() - SelectProfile - reject() - - - - - tdelistview.h - kpushbutton.h - kpushbutton.h - - -- cgit v1.2.3