diff options
Diffstat (limited to 'kicker/applets/launcher')
-rw-r--r-- | kicker/applets/launcher/configdlg.cpp | 12 | ||||
-rw-r--r-- | kicker/applets/launcher/configdlg.h | 4 | ||||
-rw-r--r-- | kicker/applets/launcher/flowgridmanager.cpp | 84 | ||||
-rw-r--r-- | kicker/applets/launcher/flowgridmanager.h | 56 | ||||
-rw-r--r-- | kicker/applets/launcher/popularity.cpp | 66 | ||||
-rw-r--r-- | kicker/applets/launcher/popularity.h | 14 | ||||
-rw-r--r-- | kicker/applets/launcher/quickaddappsmenu.cpp | 16 | ||||
-rw-r--r-- | kicker/applets/launcher/quickaddappsmenu.h | 18 | ||||
-rw-r--r-- | kicker/applets/launcher/quickbutton.cpp | 62 | ||||
-rw-r--r-- | kicker/applets/launcher/quickbutton.h | 56 | ||||
-rw-r--r-- | kicker/applets/launcher/quickbuttongroup.h | 10 | ||||
-rw-r--r-- | kicker/applets/launcher/quicklauncher.cpp | 170 | ||||
-rw-r--r-- | kicker/applets/launcher/quicklauncher.h | 54 |
13 files changed, 311 insertions, 311 deletions
diff --git a/kicker/applets/launcher/configdlg.cpp b/kicker/applets/launcher/configdlg.cpp index 9950dd2a9..c35f0970c 100644 --- a/kicker/applets/launcher/configdlg.cpp +++ b/kicker/applets/launcher/configdlg.cpp @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <qcombobox.h> +#include <tqcombobox.h> #include <klocale.h> #include <kdebug.h> @@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "configdlg.h" #include "configdlgbase.h" -ConfigDlg::ConfigDlg(QWidget *parent, const char *name, Prefs *config, +ConfigDlg::ConfigDlg(TQWidget *parent, const char *name, Prefs *config, int autoSize, KConfigDialog::DialogType dialogType, int dialogButtons) : KConfigDialog(parent, name, config, dialogType, dialogButtons), @@ -44,11 +44,11 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, Prefs *config, m_ui->iconDim->insertItem(i18n("Automatic")); for (int n=0; n<int(m_settings->iconDimChoices().size()); ++n) { - m_ui->iconDim->insertItem(QString::number( + m_ui->iconDim->insertItem(TQString::number( m_settings->iconDimChoices()[n])); } - connect(m_ui->iconDim, SIGNAL(textChanged(const QString&)), - this, SLOT(updateButtons())); + connect(m_ui->iconDim, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(updateButtons())); updateWidgets(); m_oldIconDimText = m_ui->iconDim->currentText(); updateButtons(); @@ -83,7 +83,7 @@ void ConfigDlg::updateWidgets() } else { - m_ui->iconDim->setEditText(QString::number(m_settings->iconDim())); + m_ui->iconDim->setEditText(TQString::number(m_settings->iconDim())); } } diff --git a/kicker/applets/launcher/configdlg.h b/kicker/applets/launcher/configdlg.h index 1d03a9381..ff35098d3 100644 --- a/kicker/applets/launcher/configdlg.h +++ b/kicker/applets/launcher/configdlg.h @@ -34,7 +34,7 @@ class ConfigDlg : public KConfigDialog Q_OBJECT public: - ConfigDlg(QWidget *parent, const char *name, Prefs *config, int autoSize, + ConfigDlg(TQWidget *parent, const char *name, Prefs *config, int autoSize, KConfigDialog::DialogType dialogType, int dialogButtons); protected: @@ -49,7 +49,7 @@ private: ConfigDlgBase *m_ui; Prefs* m_settings; int m_autoSize; - QString m_oldIconDimText; + TQString m_oldIconDimText; }; #endif diff --git a/kicker/applets/launcher/flowgridmanager.cpp b/kicker/applets/launcher/flowgridmanager.cpp index b5715097b..0cf3fba62 100644 --- a/kicker/applets/launcher/flowgridmanager.cpp +++ b/kicker/applets/launcher/flowgridmanager.cpp @@ -13,10 +13,10 @@ #endif -FlowGridManager::FlowGridManager(QSize p_item_size, - QSize p_space_size, - QSize p_border_size, - QSize p_frame_size, +FlowGridManager::FlowGridManager(TQSize p_item_size, + TQSize p_space_size, + TQSize p_border_size, + TQSize p_frame_size, Qt::Orientation orient, int num_items, Slack slack_x,Slack slack_y) @@ -42,25 +42,25 @@ void FlowGridManager::setNumItems(int num_items) return; _numItems=num_items; _dirty=true; } -void FlowGridManager::setItemSize(QSize p_item_size) +void FlowGridManager::setItemSize(TQSize p_item_size) { if (_pItemSize==p_item_size) return; _pItemSize=p_item_size; _dirty=true; } -void FlowGridManager::setSpaceSize(QSize p_space_size) +void FlowGridManager::setSpaceSize(TQSize p_space_size) { if (_pSpaceSize==p_space_size) return; _pSpaceSize=p_space_size; _dirty=true; } -void FlowGridManager::setBorderSize(QSize p_border_size) +void FlowGridManager::setBorderSize(TQSize p_border_size) { if (_pBorderSize==p_border_size) return; _pBorderSize=p_border_size; _dirty=true; } -void FlowGridManager::setFrameSize(QSize p_frame_size) +void FlowGridManager::setFrameSize(TQSize p_frame_size) { if (_pFrameSize==p_frame_size) return; _pFrameSize=p_frame_size; @@ -93,25 +93,25 @@ void FlowGridManager::setConserveSpace(bool conserve) // get members -QSize FlowGridManager::itemSize() const +TQSize FlowGridManager::itemSize() const { _checkReconfigure(); return _itemSize;} -QSize FlowGridManager::spaceSize() const +TQSize FlowGridManager::spaceSize() const { _checkReconfigure(); return _spaceSize;} -QSize FlowGridManager::borderSize() const +TQSize FlowGridManager::borderSize() const { _checkReconfigure(); return _borderSize;} -QSize FlowGridManager::gridDim() const +TQSize FlowGridManager::gridDim() const { _checkReconfigure(); return _gridDim;} -QSize FlowGridManager::gridSpacing() const +TQSize FlowGridManager::gridSpacing() const { _checkReconfigure(); return _gridSpacing;} -QSize FlowGridManager::frameSize() const +TQSize FlowGridManager::frameSize() const { _checkReconfigure(); return _frameSize;} -QPoint FlowGridManager::origin() const +TQPoint FlowGridManager::origin() const { _checkReconfigure(); return _origin;} Qt::Orientation FlowGridManager::orientation() const @@ -131,21 +131,21 @@ bool FlowGridManager::conserveSpace() const bool FlowGridManager::isValid() const { _checkReconfigure(); return _valid;} -QPoint FlowGridManager::posAtCell(int x,int y) const +TQPoint FlowGridManager::posAtCell(int x,int y) const { _checkReconfigure(); - return _origin+QPoint(_gridSpacing.width()*x,_gridSpacing.height()*y); + return _origin+TQPoint(_gridSpacing.width()*x,_gridSpacing.height()*y); } -QPoint FlowGridManager::pos(int i) const +TQPoint FlowGridManager::pos(int i) const { return posAtCell(cell(i).x(),cell(i).y()); } -QPoint FlowGridManager::cell(int index) const +TQPoint FlowGridManager::cell(int index) const { _checkReconfigure(); //assert((index>=0) && (index<_gridDim.width()*_gridDim.height())); int x=index % _gridDim.width(), y=index / _gridDim.width(); - return QPoint(x,y); + return TQPoint(x,y); } @@ -153,7 +153,7 @@ QPoint FlowGridManager::cell(int index) const // return height if orientation is Horizontal // return width if orientation is Vertical -int FlowGridManager::_getHH(QSize size) const +int FlowGridManager::_getHH(TQSize size) const { if (_orientation==Qt::Horizontal) return size.height(); return size.width(); @@ -161,17 +161,17 @@ int FlowGridManager::_getHH(QSize size) const // return height if orientation is Vertical // return width if orientation is Horizontal -int FlowGridManager::_getWH(QSize size) const +int FlowGridManager::_getWH(TQSize size) const { if (_orientation==Qt::Horizontal) return size.width(); return size.height(); } // swap horizontal and vertical if orientation is Vertical, otherwise return arg -QSize FlowGridManager::_swapHV(QSize hv) const +TQSize FlowGridManager::_swapHV(TQSize hv) const { if (_orientation==Qt::Horizontal) return hv; - QSize temp=hv; + TQSize temp=hv; temp.transpose(); return temp; } @@ -187,22 +187,22 @@ int FlowGridManager::_slack(int nitems,int length,int item,int space,int border) void FlowGridManager::_clear() const { - _borderSize=QSize(0,0); - _spaceSize=QSize(0,0); - _itemSize=QSize(0,0); - _gridDim=QSize(0,0); - _gridSpacing=QSize(0,0); - _origin=QPoint(0,0); - _frameSize=QSize(0,0); + _borderSize=TQSize(0,0); + _spaceSize=TQSize(0,0); + _itemSize=TQSize(0,0); + _gridDim=TQSize(0,0); + _gridSpacing=TQSize(0,0); + _origin=TQPoint(0,0); + _frameSize=TQSize(0,0); _dirty=false; _valid=false; } -int FlowGridManager::indexNearest(QPoint p) const +int FlowGridManager::indexNearest(TQPoint p) const { if (!isValid()) return -1; - QPoint c=(p-_origin)-QPoint(_spaceSize.width(),_spaceSize.height())/2; + TQPoint c=(p-_origin)-TQPoint(_spaceSize.width(),_spaceSize.height())/2; int x=c.x()/_gridSpacing.width(), y=c.y()/_gridSpacing.height(); int i= x+y*_gridDim.width(); @@ -254,20 +254,20 @@ void FlowGridManager::_reconfigure() const iSlack=slack/2; pBorderHeight+=iSlack; if (_conserveSpace) { - _itemSize=_swapHV(QSize(_getWH(_pItemSize),pItemHeight)); - _spaceSize=_swapHV(QSize(_getWH(_pSpaceSize),pSpaceHeight)); - _borderSize=_swapHV(QSize(_getWH(_pBorderSize),pBorderHeight)); + _itemSize=_swapHV(TQSize(_getWH(_pItemSize),pItemHeight)); + _spaceSize=_swapHV(TQSize(_getWH(_pSpaceSize),pSpaceHeight)); + _borderSize=_swapHV(TQSize(_getWH(_pBorderSize),pBorderHeight)); } else { - _itemSize=_swapHV(QSize(pItemHeight,pItemHeight)); - _spaceSize=_swapHV(QSize(pSpaceHeight,pSpaceHeight)); - _borderSize=_swapHV(QSize(pBorderHeight,pBorderHeight)); + _itemSize=_swapHV(TQSize(pItemHeight,pItemHeight)); + _spaceSize=_swapHV(TQSize(pSpaceHeight,pSpaceHeight)); + _borderSize=_swapHV(TQSize(pBorderHeight,pBorderHeight)); } - _gridDim=_swapHV(QSize(numspans,spanlen)); + _gridDim=_swapHV(TQSize(numspans,spanlen)); _gridSpacing=_itemSize+_spaceSize; - _origin=QPoint(_borderSize.width(),_borderSize.height()); - _frameSize=2*_borderSize+QSize(_gridDim.width()*_gridSpacing.width()-_spaceSize.width(), + _origin=TQPoint(_borderSize.width(),_borderSize.height()); + _frameSize=2*_borderSize+TQSize(_gridDim.width()*_gridSpacing.width()-_spaceSize.width(), _gridDim.height()*_gridSpacing.height()-_spaceSize.height()); _dirty=false; diff --git a/kicker/applets/launcher/flowgridmanager.h b/kicker/applets/launcher/flowgridmanager.h index 9d100c74f..521490c51 100644 --- a/kicker/applets/launcher/flowgridmanager.h +++ b/kicker/applets/launcher/flowgridmanager.h @@ -7,9 +7,9 @@ #ifndef __const_space_grid_h__ #define __const_space_grid_h__ -#include <qnamespace.h> -#include <qpoint.h> -#include <qsize.h> +#include <tqnamespace.h> +#include <tqpoint.h> +#include <tqsize.h> class FlowGridManager { @@ -22,10 +22,10 @@ public: ItemSlack,SpaceSlack,BorderSlack,NoSlack } Slack; - FlowGridManager(QSize p_item_size=QSize(0,0), - QSize p_space_size=QSize(0,0), - QSize p_border_size=QSize(0,0), - QSize frame_size=QSize(0,0), + FlowGridManager(TQSize p_item_size=TQSize(0,0), + TQSize p_space_size=TQSize(0,0), + TQSize p_border_size=TQSize(0,0), + TQSize frame_size=TQSize(0,0), Qt::Orientation orient=Qt::Horizontal, int num_items=0, Slack slack_x=ItemSlack, @@ -33,39 +33,39 @@ public: void setNumItems(int num_items); - void setItemSize(QSize item_size); - void setSpaceSize(QSize space_size); - void setBorderSize(QSize border_size); + void setItemSize(TQSize item_size); + void setSpaceSize(TQSize space_size); + void setBorderSize(TQSize border_size); void setOrientation(Qt::Orientation orient); - void setFrameSize(QSize frame_size); + void setFrameSize(TQSize frame_size); void setSlack(Slack slack_x, Slack slack_y); void setConserveSpace(bool conserve); - QSize itemSize() const; - QSize spaceSize() const; - QSize borderSize() const; - QSize gridDim() const; - QSize gridSpacing() const; - QSize frameSize() const; - QPoint origin() const; + TQSize itemSize() const; + TQSize spaceSize() const; + TQSize borderSize() const; + TQSize gridDim() const; + TQSize gridSpacing() const; + TQSize frameSize() const; + TQPoint origin() const; Qt::Orientation orientation() const; bool conserveSpace() const; // Slack slackX() const; // Slack slackY() const; - QPoint posAtCell(int x,int y) const; - QPoint pos(int i) const; - QPoint cell(int index) const; + TQPoint posAtCell(int x,int y) const; + TQPoint pos(int i) const; + TQPoint cell(int index) const; bool isValid() const; - int indexNearest(QPoint p) const; + int indexNearest(TQPoint p) const; void dump(); protected: - int _getHH(QSize size) const; - int _getWH(QSize size) const; - QSize _swapHV(QSize hv) const; + int _getHH(TQSize size) const; + int _getWH(TQSize size) const; + TQSize _swapHV(TQSize hv) const; inline void _checkReconfigure() const; int _slack(int nitems,int length,int item,int space,int border) const; void _reconfigure() const; @@ -73,15 +73,15 @@ protected: protected: // user-definable data - QSize _pItemSize,_pSpaceSize,_pBorderSize,_pFrameSize; + TQSize _pItemSize,_pSpaceSize,_pBorderSize,_pFrameSize; Slack _slackX, _slackY; bool _conserveSpace; Qt::Orientation _orientation; int _numItems; // results - mutable QSize _itemSize, _spaceSize, _borderSize, _gridDim, _gridSpacing, _frameSize; - mutable QPoint _origin; + mutable TQSize _itemSize, _spaceSize, _borderSize, _gridDim, _gridSpacing, _frameSize; + mutable TQPoint _origin; // status mutable bool _dirty, _valid; diff --git a/kicker/applets/launcher/popularity.cpp b/kicker/applets/launcher/popularity.cpp index 3bfcdd872..a22a98c99 100644 --- a/kicker/applets/launcher/popularity.cpp +++ b/kicker/applets/launcher/popularity.cpp @@ -48,7 +48,7 @@ public: // gets also 1-falloff added to its popularity. double falloff; // popularity values for each service - map<QString, double> vals; + map<TQString, double> vals; // accumulated popularity of the unknown programs // started before the statistic started double iniVal; @@ -56,7 +56,7 @@ public: struct Popularity { - QString service; + TQString service; double popularity; bool operator<(const Popularity& p) const { @@ -70,7 +70,7 @@ public: vector<SingleFalloffHistory> m_stats; vector<Popularity> m_servicesByPopularity; - map<QString, int> m_serviceRanks; + map<TQString, int> m_serviceRanks; double m_historyHorizon; }; @@ -86,13 +86,13 @@ PopularityStatistics::~PopularityStatistics() delete d; } -void PopularityStatistics::useService(const QString& service) +void PopularityStatistics::useService(const TQString& service) { vector<PopularityStatisticsImpl::SingleFalloffHistory>::iterator it(d->m_stats.begin()), end(d->m_stats.end()); for (; it != end; ++it) { - map<QString, double>::iterator valIt; + map<TQString, double>::iterator valIt; bool found(false); for (valIt = it->vals.begin(); valIt != it->vals.end(); ++valIt) { @@ -113,19 +113,19 @@ void PopularityStatistics::useService(const QString& service) d->updateServiceRanks(); } -void PopularityStatistics::moveToTop(const QStringList& newTopServiceList) +void PopularityStatistics::moveToTop(const TQStringList& newTopServiceList) { vector<PopularityStatisticsImpl::SingleFalloffHistory>::iterator histIt(d->m_stats.begin()), histEnd(d->m_stats.end()); for (; histIt != histEnd; ++histIt) { - set<QString> newTopServices; + set<TQString> newTopServices; for (uint n=0; n<newTopServiceList.size(); ++n) newTopServices.insert(newTopServiceList[n]); // Sort by popularity vector<PopularityStatisticsImpl::Popularity> ranking; - map<QString, double>::iterator valIt; + map<TQString, double>::iterator valIt; for (valIt = histIt->vals.begin(); valIt != histIt->vals.end(); ++valIt) { PopularityStatisticsImpl::Popularity pop; @@ -137,7 +137,7 @@ void PopularityStatistics::moveToTop(const QStringList& newTopServiceList) // Get the new positions of each service in the ranking. // We don't touch the popularity values in the ranking. - list<QString> topServiceList, bottomServiceList; + list<TQString> topServiceList, bottomServiceList; vector<PopularityStatisticsImpl::Popularity>:: iterator rankIt; for (rankIt = ranking.begin(); rankIt != ranking.end(); ++rankIt) { @@ -160,16 +160,16 @@ void PopularityStatistics::moveToTop(const QStringList& newTopServiceList) newTopServices.erase(newTopServices.begin()); } - list<QString> newServiceList; + list<TQString> newServiceList; copy(topServiceList.begin(), topServiceList.end(), - back_insert_iterator<list<QString> >(newServiceList)); + back_insert_iterator<list<TQString> >(newServiceList)); copy(bottomServiceList.begin(), bottomServiceList.end(), - back_insert_iterator<list<QString> >(newServiceList)); + back_insert_iterator<list<TQString> >(newServiceList)); // Merge the old list of service popularities // with the new ordering of the services histIt->vals.clear(); - list<QString>::iterator servIt; + list<TQString>::iterator servIt; uint serviceIndex = 0; //kdDebug() << endl; @@ -207,12 +207,12 @@ void PopularityStatistics::moveToTop(const QStringList& newTopServiceList) /*v Old version - moves everything else one position up and 'service' to the bottom -void PopularityStatistics::moveToBottom(const QString& service) +void PopularityStatistics::moveToBottom(const TQString& service) { // Moves a service to the bottom of the ranking // by moving everything else to the top d->updateServiceRanks(); - QStringList allButOneServices; + TQStringList allButOneServices; vector<PopularityStatisticsImpl::Popularity>::iterator it(d->m_servicesByPopularity.begin()), end(d->m_servicesByPopularity.end()); @@ -224,7 +224,7 @@ void PopularityStatistics::moveToBottom(const QString& service) moveToTop(allButOneServices); }*/ -void PopularityStatistics::moveToBottom(const QString& service) +void PopularityStatistics::moveToBottom(const TQString& service) { vector<PopularityStatisticsImpl::SingleFalloffHistory>::iterator it(d->m_stats.begin()), end(d->m_stats.end()); @@ -237,12 +237,12 @@ void PopularityStatistics::moveToBottom(const QString& service) d->updateServiceRanks(); } -QString PopularityStatistics::serviceByRank(int n) const +TQString PopularityStatistics::serviceByRank(int n) const { if (n >= 0 && n < int(d->m_servicesByPopularity.size())) return d->m_servicesByPopularity[n].service; else - return QString(); + return TQString(); } double PopularityStatistics::popularityByRank(int n) const @@ -253,7 +253,7 @@ double PopularityStatistics::popularityByRank(int n) const return 0.0; } -int PopularityStatistics::rankByService(const QString service) +int PopularityStatistics::rankByService(const TQString service) { if (d->m_serviceRanks.find(service) != d->m_serviceRanks.end()) { @@ -264,16 +264,16 @@ int PopularityStatistics::rankByService(const QString service) void PopularityStatistics::writeConfig(Prefs* prefs) const { - QStringList serviceNames, serviceHistories; + TQStringList serviceNames, serviceHistories; int limit = prefs->serviceCacheSize(); //kdDebug() << "popularityData: writeConfig" << endl; for (int n=0; n<int(d->m_servicesByPopularity.size()) && n<limit; ++n) { PopularityStatisticsImpl::Popularity pop = d->m_servicesByPopularity[n]; - QStringList historyData; + TQStringList historyData; for (int i=0; i<int(d->m_stats.size()); ++i) { - historyData << QString::number(d->m_stats[i].vals[pop.service]); + historyData << TQString::number(d->m_stats[i].vals[pop.service]); } serviceNames << pop.service; serviceHistories << historyData.join("/"); @@ -286,13 +286,13 @@ void PopularityStatistics::writeConfig(Prefs* prefs) const void PopularityStatistics::readConfig(Prefs* prefs) { int n = 0; - QStringList serviceNames = prefs->serviceNames(); - QStringList histories = prefs->serviceHistories(); + TQStringList serviceNames = prefs->serviceNames(); + TQStringList histories = prefs->serviceHistories(); for (n = std::min(serviceNames.size(), histories.size())-1; n>=0; --n) { - QString serviceName = serviceNames[n]; - QStringList serviceHistory = - QStringList::split("/", histories[n]); + TQString serviceName = serviceNames[n]; + TQStringList serviceHistory = + TQStringList::split("/", histories[n]); for (int i=min(serviceHistory.size(), d->m_stats.size())-1; i>=0; --i) { d->m_stats[i].vals[serviceName] = serviceHistory[i].toDouble(); @@ -301,7 +301,7 @@ void PopularityStatistics::readConfig(Prefs* prefs) for (int i=0; i<int(d->m_stats.size()); ++i) { - map<QString, double>::iterator valIt; + map<TQString, double>::iterator valIt; double valSum = 0; for (valIt = d->m_stats[i].vals.begin(); valIt != d->m_stats[i].vals.end(); ++valIt) @@ -356,7 +356,7 @@ void PopularityStatisticsImpl::normalizeHistory(SingleFalloffHistory& h) { //kdDebug() << "Normalize history" << endl; double sum = h.iniVal; - map<QString, double>::iterator it; + map<TQString, double>::iterator it; for (it = h.vals.begin(); it != h.vals.end(); ++it) { sum += it->second; @@ -375,7 +375,7 @@ void PopularityStatisticsImpl::updateServiceRanks() vector<SingleFalloffHistory>::iterator it(m_stats.begin()), end(m_stats.end()); - map<QString, double> serviceValSum, serviceValWeightSum; + map<TQString, double> serviceValSum, serviceValWeightSum; int numStats = m_stats.size(); for (int statIndex = 0; it != end; ++it, ++statIndex) { @@ -387,7 +387,7 @@ void PopularityStatisticsImpl::updateServiceRanks() continue; } - map<QString, double>::iterator valIt; + map<TQString, double>::iterator valIt; /*double valSum = 0; for (valIt = it->vals.begin(); valIt != it->vals.end(); ++valIt) { @@ -402,7 +402,7 @@ void PopularityStatisticsImpl::updateServiceRanks() } m_servicesByPopularity.clear(); - map<QString, double>::iterator sIt; + map<TQString, double>::iterator sIt; for (sIt = serviceValWeightSum.begin(); sIt != serviceValWeightSum.end(); ++sIt) { @@ -417,7 +417,7 @@ void PopularityStatisticsImpl::updateServiceRanks() for (uint n = 0; n < m_servicesByPopularity.size(); ++n) { m_serviceRanks[m_servicesByPopularity[n].service] = n; - /*kdDebug() << QString("Rank %1: %2 %3").arg(n) + /*kdDebug() << TQString("Rank %1: %2 %3").arg(n) .arg(m_servicesByPopularity[n].popularity) .arg(m_servicesByPopularity[n].service) << endl;*/ } diff --git a/kicker/applets/launcher/popularity.h b/kicker/applets/launcher/popularity.h index b1dcb32d6..06e7e0454 100644 --- a/kicker/applets/launcher/popularity.h +++ b/kicker/applets/launcher/popularity.h @@ -24,8 +24,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __popularity_h__ #define __popularity_h__ -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> class PopularityStatisticsImpl; class Prefs; @@ -61,7 +61,7 @@ public: * counters for the given service and decrease the * counters for all the others. */ - void useService(const QString& service); + void useService(const TQString& service); /** * Exchange all state variables of the most @@ -71,18 +71,18 @@ public: * as before. Order of items in the string list * does *not* matter/ */ - void moveToTop(const QStringList& services); + void moveToTop(const TQStringList& services); /** * Sets all counters to zero for the given service */ - void moveToBottom(const QString& service); + void moveToBottom(const TQString& service); /** * Retrieve the name of a service by its position * in the current popularity ranking */ - QString serviceByRank(int n) const; + TQString serviceByRank(int n) const; /** * Retrieve the popularity (0-1) of a service by @@ -94,7 +94,7 @@ public: * Gets the rank of a given service. * Returns -1 if the service is not in the ranking */ - int rankByService(const QString service); + int rankByService(const TQString service); /** * Writes the configuration. diff --git a/kicker/applets/launcher/quickaddappsmenu.cpp b/kicker/applets/launcher/quickaddappsmenu.cpp index 74d00a6e4..0eebec315 100644 --- a/kicker/applets/launcher/quickaddappsmenu.cpp +++ b/kicker/applets/launcher/quickaddappsmenu.cpp @@ -33,22 +33,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <kdebug.h> #include "quickaddappsmenu.h" -QuickAddAppsMenu::QuickAddAppsMenu(const QString &label, const QString &relPath, QWidget *target, QWidget *parent, const char *name, const QString &sender) +QuickAddAppsMenu::QuickAddAppsMenu(const TQString &label, const TQString &relPath, TQWidget *target, TQWidget *parent, const char *name, const TQString &sender) : PanelServiceMenu(label, relPath, parent, name) { _targetObject = target; _sender = sender; - connect(this, SIGNAL(addAppBefore(QString,QString)), - target, SLOT(addAppBeforeManually(QString,QString))); + connect(this, TQT_SIGNAL(addAppBefore(TQString,TQString)), + target, TQT_SLOT(addAppBeforeManually(TQString,TQString))); } -QuickAddAppsMenu::QuickAddAppsMenu(QWidget *target, QWidget *parent, const QString &sender, const char *name) - : PanelServiceMenu(QString::null, QString::null, parent, name) +QuickAddAppsMenu::QuickAddAppsMenu(TQWidget *target, TQWidget *parent, const TQString &sender, const char *name) + : PanelServiceMenu(TQString::null, TQString::null, parent, name) { _targetObject = target; _sender = sender; - connect(this, SIGNAL(addAppBefore(QString,QString)), - target, SLOT(addAppBeforeManually(QString,QString))); + connect(this, TQT_SIGNAL(addAppBefore(TQString,TQString)), + target, TQT_SLOT(addAppBeforeManually(TQString,TQString))); } void QuickAddAppsMenu::slotExec(int id) @@ -60,7 +60,7 @@ void QuickAddAppsMenu::slotExec(int id) } -PanelServiceMenu *QuickAddAppsMenu::newSubMenu(const QString &label, const QString &relPath, QWidget *parent, const char *name, const QString &insertInlineHeader) +PanelServiceMenu *QuickAddAppsMenu::newSubMenu(const TQString &label, const TQString &relPath, TQWidget *parent, const char *name, const TQString &insertInlineHeader) { return new QuickAddAppsMenu(label, relPath, _targetObject, parent, name, _sender); } diff --git a/kicker/applets/launcher/quickaddappsmenu.h b/kicker/applets/launcher/quickaddappsmenu.h index 88465049c..01c185181 100644 --- a/kicker/applets/launcher/quickaddappsmenu.h +++ b/kicker/applets/launcher/quickaddappsmenu.h @@ -31,21 +31,21 @@ s class QuickAddAppsMenu: public PanelServiceMenu { Q_OBJECT public: - QuickAddAppsMenu(const QString &label, const QString &relPath, QWidget *target, QWidget *parent=0, const char *name=0, const QString &sender=QString("")); - QuickAddAppsMenu(QWidget *target, QWidget *parent=0, const QString &sender=QString(""), const char *name=0); + QuickAddAppsMenu(const TQString &label, const TQString &relPath, TQWidget *target, TQWidget *parent=0, const char *name=0, const TQString &sender=TQString("")); + QuickAddAppsMenu(TQWidget *target, TQWidget *parent=0, const TQString &sender=TQString(""), const char *name=0); signals: - void addAppBefore(QString,QString); + void addAppBefore(TQString,TQString); protected slots: virtual void slotExec(int id); protected: - virtual PanelServiceMenu *newSubMenu(const QString &label, - const QString &relPath, - QWidget *parent, + virtual PanelServiceMenu *newSubMenu(const TQString &label, + const TQString &relPath, + TQWidget *parent, const char *name, - const QString & _inlineHeader=QString::null); + const TQString & _inlineHeader=TQString::null); private: - QWidget *_targetObject; - QString _sender; + TQWidget *_targetObject; + TQString _sender; }; #endif diff --git a/kicker/applets/launcher/quickbutton.cpp b/kicker/applets/launcher/quickbutton.cpp index 933088b04..2ac0742ca 100644 --- a/kicker/applets/launcher/quickbutton.cpp +++ b/kicker/applets/launcher/quickbutton.cpp @@ -24,10 +24,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "quickbutton.h" #include "quickaddappsmenu.h" -#include <qpainter.h> -#include <qdrawutil.h> -#include <qpopupmenu.h> -#include <qtooltip.h> +#include <tqpainter.h> +#include <tqdrawutil.h> +#include <tqpopupmenu.h> +#include <tqtooltip.h> #include <kactionclasses.h> #include <kickertip.h> @@ -52,7 +52,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define DEBUGSTR kndDebug() #endif -QuickURL::QuickURL(const QString &u) +QuickURL::QuickURL(const TQString &u) { DEBUGSTR<<"QuickURL::QuickURL("<<u<<")"<<endl<<flush; KService::Ptr _service=0; _menuId = u; @@ -66,7 +66,7 @@ QuickURL::QuickURL(const QString &u) if (_menuId.endsWith(".desktop")) { // Strip path - QString s = _menuId; + TQString s = _menuId; s = s.mid(s.findRev('/')+1); s = s.left(s.length()-8); _service = KService::serviceByStorageId(s); @@ -116,18 +116,18 @@ void QuickURL::run() const } //similar to MimeType::pixmapForURL -QPixmap QuickURL::pixmap( mode_t _mode, KIcon::Group _group, - int _force_size, int _state, QString *) const +TQPixmap QuickURL::pixmap( mode_t _mode, KIcon::Group _group, + int _force_size, int _state, TQString *) const { // Load icon - QPixmap pxmap = KMimeType::pixmapForURL(_kurl, _mode, _group, _force_size, _state); + TQPixmap pxmap = KMimeType::pixmapForURL(_kurl, _mode, _group, _force_size, _state); // Resize to fit button - pxmap.convertFromImage(pxmap.convertToImage().smoothScale(_force_size,_force_size, QImage::ScaleMin)); + pxmap.convertFromImage(pxmap.convertToImage().smoothScale(_force_size,_force_size, TQImage::ScaleMin)); return pxmap; } -QuickButton::QuickButton(const QString &u, KAction* configAction, - QWidget *parent, const char *name) : +QuickButton::QuickButton(const TQString &u, KAction* configAction, + TQWidget *parent, const char *name) : SimpleButton(parent, name), m_flashCounter(0), m_sticky(false) @@ -138,29 +138,29 @@ QuickButton::QuickButton(const QString &u, KAction* configAction, _oldCursor = cursor(); _qurl=new QuickURL(u); - QToolTip::add(this, _qurl->name()); + TQToolTip::add(this, _qurl->name()); resize(int(DEFAULT_ICON_DIM),int(DEFAULT_ICON_DIM)); - QBrush bgbrush(colorGroup().brush(QColorGroup::Background)); + TQBrush bgbrush(colorGroup().brush(TQColorGroup::Background)); QuickAddAppsMenu *addAppsMenu = new QuickAddAppsMenu( parent, this, _qurl->url()); - _popup = new QPopupMenu(this); + _popup = new TQPopupMenu(this); _popup->insertItem(i18n("Add Application"), addAppsMenu); configAction->plug(_popup); _popup->insertSeparator(); _popup->insertItem(SmallIcon("remove"), i18n("Remove"), - this, SLOT(removeApp())); + this, TQT_SLOT(removeApp())); m_stickyAction = new KToggleAction(i18n("Never Remove Automatically"), KShortcut(), this); - connect(m_stickyAction, SIGNAL(toggled(bool)), - this, SLOT(slotStickyToggled(bool))); + connect(m_stickyAction, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotStickyToggled(bool))); m_stickyAction->plug(_popup, 2); m_stickyId = _popup->idAt(2); - connect(this, SIGNAL(clicked()), SLOT(launch())); - connect(this, SIGNAL(removeApp(QuickButton *)), parent, - SLOT(removeAppManually(QuickButton *))); + connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(launch())); + connect(this, TQT_SIGNAL(removeApp(QuickButton *)), parent, + TQT_SLOT(removeAppManually(QuickButton *))); } QuickButton::~QuickButton() @@ -169,13 +169,13 @@ QuickButton::~QuickButton() } -QString QuickButton::url() const +TQString QuickButton::url() const { return _qurl->url(); } -QString QuickButton::menuId() const +TQString QuickButton::menuId() const { return _qurl->menuId();} @@ -189,26 +189,26 @@ void QuickButton::loadIcon() setPixmap(_icon); } -void QuickButton::resizeEvent(QResizeEvent *e) +void QuickButton::resizeEvent(TQResizeEvent *e) { loadIcon(); SimpleButton::resizeEvent(e); } -void QuickButton::mousePressEvent(QMouseEvent *e) +void QuickButton::mousePressEvent(TQMouseEvent *e) { if (e->button() == RightButton) _popup->popup(e->globalPos()); else if (e->button() == LeftButton) { _dragPos = e->pos(); - QButton::mousePressEvent(e); + TQButton::mousePressEvent(e); } } -void QuickButton::mouseMoveEvent(QMouseEvent *e) +void QuickButton::mouseMoveEvent(TQMouseEvent *e) { if ((e->state() & LeftButton) == 0) return; - QPoint p(e->pos() - _dragPos); + TQPoint p(e->pos() - _dragPos); if (p.manhattanLength() <= KGlobalSettings::dndEventDelay()) return; DEBUGSTR<<"dragstart"<<endl<<flush; @@ -264,7 +264,7 @@ void QuickButton::removeApp() void QuickButton::flash() { m_flashCounter = 2000; - QTimer::singleShot(0, this, SLOT(slotFlash())); + TQTimer::singleShot(0, this, TQT_SLOT(slotFlash())); } void QuickButton::slotFlash() @@ -275,7 +275,7 @@ void QuickButton::slotFlash() m_flashCounter -= timeout; if (m_flashCounter < 0) m_flashCounter = 0; update(); - QTimer::singleShot(timeout, this, SLOT(slotFlash())); + TQTimer::singleShot(timeout, this, TQT_SLOT(slotFlash())); } } @@ -300,7 +300,7 @@ void QuickButton::updateKickerTip(KickerTip::Data &data) data.message = _qurl->name(); data.direction = m_popupDirection; data.subtext = _qurl->genericName(); - if (data.subtext == QString()) + if (data.subtext == TQString()) { data.subtext = data.message; } diff --git a/kicker/applets/launcher/quickbutton.h b/kicker/applets/launcher/quickbutton.h index 98eabec6e..263651cc0 100644 --- a/kicker/applets/launcher/quickbutton.h +++ b/kicker/applets/launcher/quickbutton.h @@ -24,11 +24,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __quickbutton_h__ #define __quickbutton_h__ -#include <qbutton.h> -#include <qpoint.h> -#include <qstring.h> -#include <qpixmap.h> -#include <qcursor.h> +#include <tqbutton.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqpixmap.h> +#include <tqcursor.h> #include <kickertip.h> #include <kicontheme.h> @@ -45,22 +45,22 @@ class KToggleAction; class QuickURL { public: - QuickURL(const QString &u); + QuickURL(const TQString &u); KURL kurl() const {return _kurl;}; - QString url() const {return _kurl.url();}; - QString menuId() const {return _menuId;}; - QString genericName() const { return m_genericName; } - QString name() const { return m_name; } + TQString url() const {return _kurl.url();}; + TQString menuId() const {return _menuId;}; + TQString genericName() const { return m_genericName; } + TQString name() const { return m_name; } KService::Ptr service() const {return _service;}; void run() const; - QPixmap pixmap(mode_t _mode = 0, KIcon::Group _group = KIcon::Desktop, - int _force_size = 0, int _state = 0, QString * _path = 0L) const; + TQPixmap pixmap(mode_t _mode = 0, KIcon::Group _group = KIcon::Desktop, + int _force_size = 0, int _state = 0, TQString * _path = 0L) const; private: KURL _kurl; - QString _menuId; - QString m_genericName; - QString m_name; + TQString _menuId; + TQString m_genericName; + TQString m_name; KService::Ptr _service; }; @@ -71,12 +71,12 @@ class QuickButton: public SimpleButton, public KickerTip::Client { public: enum { DEFAULT_ICON_DIM = 16 }; enum { ICON_MARGIN = 1 }; - QuickButton(const QString &u, KAction* configAction, - QWidget *parent=0, const char *name=0); + QuickButton(const TQString &u, KAction* configAction, + TQWidget *parent=0, const char *name=0); ~QuickButton(); - QString url() const; - QString menuId() const; - QPixmap icon() const{ return _icon;} + TQString url() const; + TQString menuId() const; + TQPixmap icon() const{ return _icon;} bool sticky() { return m_sticky; } void setSticky(bool bSticky); void setPopupDirection(KPanelApplet::Direction d); @@ -88,13 +88,13 @@ public: signals: void removeApp(QuickButton *); - void executed(QString serviceStorageID); + void executed(TQString serviceStorageID); void stickyToggled(bool isSticky); protected: - void mousePressEvent(QMouseEvent *e); - void mouseMoveEvent(QMouseEvent *e); - void resizeEvent(QResizeEvent *rsevent); + void mousePressEvent(TQMouseEvent *e); + void mouseMoveEvent(TQMouseEvent *e); + void resizeEvent(TQResizeEvent *rsevent); void loadIcon(); void updateKickerTip(KickerTip::Data &data); @@ -108,10 +108,10 @@ protected slots: private: int m_flashCounter; QuickURL *_qurl; - QPoint _dragPos; - QPopupMenu *_popup; - QPixmap _icon, _iconh; - QCursor _oldCursor; + TQPoint _dragPos; + TQPopupMenu *_popup; + TQPixmap _icon, _iconh; + TQCursor _oldCursor; bool _highlight, _changeCursorOverItem, _dragEnabled; int _iconDim; bool m_sticky; diff --git a/kicker/applets/launcher/quickbuttongroup.h b/kicker/applets/launcher/quickbuttongroup.h index 1d373ae92..85f28845c 100644 --- a/kicker/applets/launcher/quickbuttongroup.h +++ b/kicker/applets/launcher/quickbuttongroup.h @@ -7,7 +7,7 @@ #ifndef __quickbuttongroup_h__ #define __quickbuttongroup_h__ -#include <qstring.h> +#include <tqstring.h> #include <functional> #include "easyvector.h" #include "quickbutton.h" @@ -17,7 +17,7 @@ class QuickButtonGroup: virtual public EasyVector< QuickButton* > { public: QuickButtonGroup(const EasyVector< QuickButton* > &kv):EasyVector< QuickButton* >(kv){}; QuickButtonGroup():EasyVector< QuickButton* >(){}; - Index findDescriptor(const QString &desc); + Index findDescriptor(const TQString &desc); void show(); void hide(); @@ -27,7 +27,7 @@ public: void setUpdatesEnabled(bool enable); }; -QuickButtonGroup::Index QuickButtonGroup::findDescriptor(const QString &desc) +QuickButtonGroup::Index QuickButtonGroup::findDescriptor(const TQString &desc) { return findProperty(desc, std::mem_fun(&QuickButton::url));} inline void QuickButtonGroup::setUpdatesEnabled(bool enable) @@ -38,10 +38,10 @@ inline void QuickButtonGroup::setUpdatesEnabled(bool enable) } inline void QuickButtonGroup::show() -{ std::for_each(begin(),end(),std::mem_fun(&QWidget::show));} +{ std::for_each(begin(),end(),std::mem_fun(&TQWidget::show));} inline void QuickButtonGroup::hide() -{ std::for_each(begin(),end(),std::mem_fun(&QWidget::hide));} +{ std::for_each(begin(),end(),std::mem_fun(&TQWidget::hide));} inline void QuickButtonGroup::setDragging(bool drag) { std::for_each(begin(),end(),std::bind2nd(std::mem_fun(&QuickButton::setDragging),drag));} diff --git a/kicker/applets/launcher/quicklauncher.cpp b/kicker/applets/launcher/quicklauncher.cpp index abae9efe1..557ea4cd3 100644 --- a/kicker/applets/launcher/quicklauncher.cpp +++ b/kicker/applets/launcher/quicklauncher.cpp @@ -22,11 +22,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <qpainter.h> -#include <qpopupmenu.h> -#include <qslider.h> -#include <qtimer.h> -#include <qtooltip.h> +#include <tqpainter.h> +#include <tqpopupmenu.h> +#include <tqslider.h> +#include <tqtimer.h> +#include <tqtooltip.h> #include <dcopclient.h> #include <kaction.h> @@ -69,7 +69,7 @@ const ButtonGroup::Index Append=ButtonGroup::Append; extern "C" { - KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("quicklauncher"); return new QuickLauncher(configFile, KPanelApplet::Normal, @@ -78,8 +78,8 @@ extern "C" } } -QuickLauncher::QuickLauncher(const QString& configFile, Type type, int actions, - QWidget *parent, const char *name) : +QuickLauncher::QuickLauncher(const TQString& configFile, Type type, int actions, + TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name) { DCOPObject::setObjId("QuickLauncherApplet"); @@ -108,10 +108,10 @@ QuickLauncher::QuickLauncher(const QString& configFile, Type type, int actions, m_dragButtons = 0; m_configAction = new KAction(i18n("Configure Quicklauncher..."), "configure", KShortcut(), - this, SLOT(slotConfigure()), this); + this, TQT_SLOT(slotConfigure()), this); - m_saveTimer = new QTimer(this); - connect(m_saveTimer, SIGNAL(timeout()), this, SLOT(saveConfig())); + m_saveTimer = new TQTimer(this); + connect(m_saveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(saveConfig())); m_popularity = new PopularityStatistics(); @@ -125,15 +125,15 @@ QuickLauncher::QuickLauncher(const QString& configFile, Type type, int actions, setRefreshEnabled(true); setAcceptDrops(true); - //QToolTip::add(this, i18n("Drop applications here")); + //TQToolTip::add(this, i18n("Drop applications here")); DEBUGSTR << " QuickLauncher::QuickLauncher(" << configFile << ",...) END" << endl << flush; DCOPClient *dcopClient = KApplication::dcopClient(); dcopClient->connectDCOPSignal(0, "appLauncher", - "serviceStartedByStorageId(QString,QString)", + "serviceStartedByStorageId(TQString,TQString)", "QuickLauncherApplet", - "serviceStartedByStorageId(QString,QString)", + "serviceStartedByStorageId(TQString,TQString)", false); kdDebug() << "Quicklauncher registered DCOP signal" << endl; } @@ -161,22 +161,22 @@ QuickLauncher::~QuickLauncher() void QuickLauncher::buildPopupMenu() { QuickAddAppsMenu *addAppsMenu = new QuickAddAppsMenu(this, this); - m_popup = new QPopupMenu(this); + m_popup = new TQPopupMenu(this); m_popup->insertItem(i18n("Add Application"), addAppsMenu); m_configAction->plug(m_popup); - m_appletPopup = new QPopupMenu(this); + m_appletPopup = new TQPopupMenu(this); m_appletPopup->insertItem(i18n("Add Application"), addAppsMenu); - m_removeAppsMenu = new QPopupMenu(this); - connect(m_removeAppsMenu, SIGNAL(aboutToShow()), - SLOT(fillRemoveAppsMenu())); - connect(m_removeAppsMenu, SIGNAL(activated(int)), - SLOT(removeAppManually(int))); + m_removeAppsMenu = new TQPopupMenu(this); + connect(m_removeAppsMenu, TQT_SIGNAL(aboutToShow()), + TQT_SLOT(fillRemoveAppsMenu())); + connect(m_removeAppsMenu, TQT_SIGNAL(activated(int)), + TQT_SLOT(removeAppManually(int))); m_appletPopup->insertItem(i18n("Remove Application"), m_removeAppsMenu); m_appletPopup->insertSeparator(); m_appletPopup->setCheckable( true ); - m_appletPopup->insertItem(i18n("About"), this, SLOT(about())); + m_appletPopup->insertItem(i18n("About"), this, TQT_SLOT(about())); setCustomMenu(m_appletPopup); } @@ -189,7 +189,7 @@ void QuickLauncher::fillRemoveAppsMenu() int i = 0; while (iter != m_buttons->end()) { - QString text = QToolTip::textFor(*iter); + TQString text = TQToolTip::textFor(*iter); if (text.isEmpty()) { text = (*iter)->url(); @@ -235,8 +235,8 @@ void QuickLauncher::slotConfigure() m_configDialog = new ConfigDlg(this, "configdialog", m_settings, SIZE_AUTO, KDialogBase::Plain, KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Default); - connect(m_configDialog, SIGNAL(settingsChanged()), - this, SLOT(slotSettingsDialogChanged())); + connect(m_configDialog, TQT_SIGNAL(settingsChanged()), + this, TQT_SLOT(slotSettingsDialogChanged())); } m_configDialog->show(); @@ -254,7 +254,7 @@ int QuickLauncher::findApp(QuickButton *button) } -int QuickLauncher::findApp(QString url) +int QuickLauncher::findApp(TQString url) { if (m_buttons->empty()) { @@ -285,8 +285,8 @@ void QuickLauncher::removeApp(int index, bool manuallyRemoved) DEBUGSTR << "Removing button. index=" << index << " url='" << (*m_buttons)[index]->url() << "'" << endl << flush; - QString removeAppUrl = (*m_buttons)[index]->url(); - QString removeAppMenuId = (*m_buttons)[index]->menuId(); + TQString removeAppUrl = (*m_buttons)[index]->url(); + TQString removeAppMenuId = (*m_buttons)[index]->menuId(); delete (*m_buttons)[index]; m_buttons->eraseAt(index); @@ -307,7 +307,7 @@ void QuickLauncher::removeApp(int index, bool manuallyRemoved) } -void QuickLauncher::removeApp(QString url, bool manuallyRemoved) +void QuickLauncher::removeApp(TQString url, bool manuallyRemoved) { int index = findApp(url); if (index == NotFound) @@ -333,7 +333,7 @@ void QuickLauncher::removeAppManually(QuickButton *button) int QuickLauncher::widthForHeight(int h) const { FlowGridManager temp_manager = *m_manager; - temp_manager.setFrameSize(QSize(h,h)); + temp_manager.setFrameSize(TQSize(h,h)); temp_manager.setOrientation(Qt::Horizontal); // ??? probably not necessary if (temp_manager.isValid()) { @@ -346,7 +346,7 @@ int QuickLauncher::widthForHeight(int h) const int QuickLauncher::heightForWidth(int w) const { FlowGridManager temp_manager=*m_manager; - temp_manager.setFrameSize(QSize(w,w)); + temp_manager.setFrameSize(TQSize(w,w)); temp_manager.setOrientation(Qt::Vertical); // ??? probably not necessary if (temp_manager.isValid()) { @@ -365,10 +365,10 @@ int QuickLauncher::dimension() const return size().height(); } -void QuickLauncher::addApp(QString url, bool manuallyAdded) +void QuickLauncher::addApp(TQString url, bool manuallyAdded) { assert(m_buttons); - QString newButtonId = QuickURL(url).menuId(); + TQString newButtonId = QuickURL(url).menuId(); if (m_appOrdering.find(newButtonId) == m_appOrdering.end()) { m_appOrdering[newButtonId] = m_appOrdering.size(); @@ -376,7 +376,7 @@ void QuickLauncher::addApp(QString url, bool manuallyAdded) uint appPos; for (appPos = 0; appPos < m_buttons->size(); ++appPos) { - QString buttonId = (*m_buttons)[appPos]->menuId(); + TQString buttonId = (*m_buttons)[appPos]->menuId(); if (m_appOrdering[buttonId] >= m_appOrdering[newButtonId]) { break; @@ -385,18 +385,18 @@ void QuickLauncher::addApp(QString url, bool manuallyAdded) addApp(url, appPos, manuallyAdded); } -QuickButton* QuickLauncher::createButton(QString url) +QuickButton* QuickLauncher::createButton(TQString url) { QuickButton* newButton=new QuickButton(url, m_configAction, this); - connect(newButton, SIGNAL(executed(QString)), - this, SLOT(slotOwnServiceExecuted(QString))); - connect(newButton, SIGNAL(stickyToggled(bool)), - this, SLOT(slotStickyToggled())); + connect(newButton, TQT_SIGNAL(executed(TQString)), + this, TQT_SLOT(slotOwnServiceExecuted(TQString))); + connect(newButton, TQT_SIGNAL(stickyToggled(bool)), + this, TQT_SLOT(slotStickyToggled())); newButton->setPopupDirection(popupDirection()); return newButton; } -void QuickLauncher::addApp(QString url, int index, bool manuallyAdded) +void QuickLauncher::addApp(TQString url, int index, bool manuallyAdded) { DEBUGSTR << endl <<"About to add: url='" << url << "' index=" << index << endl << flush; @@ -447,12 +447,12 @@ void QuickLauncher::updateInsertionPosToStatusQuo() // Update the app ordering map, so that next time, // addApp(url,manAdded) (without index) will insert the // item at the same position again. - std::list<QString> appList; + std::list<TQString> appList; std::set<int> posList; //kdDebug() << "Rearranging application order. Before:" << endl; for (uint n = 0; n < m_buttons->size(); ++n) { - QString buttonId = (*m_buttons)[n]->menuId(); + TQString buttonId = (*m_buttons)[n]->menuId(); appList.push_back(buttonId); if (m_appOrdering.find(buttonId) == m_appOrdering.end()) { @@ -473,7 +473,7 @@ void QuickLauncher::updateInsertionPosToStatusQuo() //kdDebug() << "Done." << endl; } -void QuickLauncher::addAppBeforeManually(QString url, QString sender) +void QuickLauncher::addAppBeforeManually(TQString url, TQString sender) { if (sender.isNull()) { @@ -501,7 +501,7 @@ void QuickLauncher::about() } -void QuickLauncher::mousePressEvent(QMouseEvent *e) +void QuickLauncher::mousePressEvent(TQMouseEvent *e) { if (e->button() == RightButton) { @@ -509,12 +509,12 @@ void QuickLauncher::mousePressEvent(QMouseEvent *e) } } -void QuickLauncher::resizeEvent(QResizeEvent*) +void QuickLauncher::resizeEvent(TQResizeEvent*) { refreshContents(); } -void QuickLauncher::dragEnterEvent(QDragEnterEvent *e) +void QuickLauncher::dragEnterEvent(TQDragEnterEvent *e) { DEBUGSTR << "QuickLauncher::dragEnterEvent(pos=" << e->pos() << " type=" << e->type() << ")" << endl << flush; @@ -534,7 +534,7 @@ void QuickLauncher::dragEnterEvent(QDragEnterEvent *e) m_dragButtons=new ButtonGroup; m_oldButtons=new ButtonGroup(*m_buttons); - QString url; + TQString url; KURL::List::ConstIterator it = kurlList.begin(); for ( ; it != kurlList.end(); ++it ) { @@ -568,7 +568,7 @@ void QuickLauncher::dragEnterEvent(QDragEnterEvent *e) } -void QuickLauncher::dragMoveEvent(QDragMoveEvent *e) +void QuickLauncher::dragMoveEvent(TQDragMoveEvent *e) { if (!m_dragAccepted) { @@ -594,7 +594,7 @@ void QuickLauncher::dragMoveEvent(QDragMoveEvent *e) } -void QuickLauncher::dragLeaveEvent(QDragLeaveEvent *e) +void QuickLauncher::dragLeaveEvent(TQDragLeaveEvent *e) { DEBUGSTR << "QuickLauncher::dragLeaveEvent(type=" << e->type() << ")" << endl << flush; @@ -612,7 +612,7 @@ void QuickLauncher::dragLeaveEvent(QDragLeaveEvent *e) } -void QuickLauncher::dropEvent(QDropEvent *e) +void QuickLauncher::dropEvent(TQDropEvent *e) { DEBUGSTR << "QuickLauncher::dropEvent(pos=" << e->pos() << " type=" << e->type() << ")" << endl << flush; @@ -719,13 +719,13 @@ void QuickLauncher::refreshContents() } m_space = std::max((idim/8)-1, 0); m_border = m_space; - m_buttonSize = QSize(idim, idim); + m_buttonSize = TQSize(idim, idim); m_manager->setOrientation(orientation()); m_manager->setNumItems(m_buttons->size()); m_manager->setFrameSize(size()); m_manager->setItemSize(m_buttonSize); - m_manager->setSpaceSize(QSize(m_space, m_space)); - m_manager->setBorderSize(QSize(m_border, m_border)); + m_manager->setSpaceSize(TQSize(m_space, m_space)); + m_manager->setBorderSize(TQSize(m_border, m_border)); if (!m_refreshEnabled) { m_needsRefresh=true; @@ -740,7 +740,7 @@ void QuickLauncher::refreshContents() } unsigned index; - QPoint pos; + TQPoint pos; setUpdatesEnabled(false); m_buttons->setUpdatesEnabled(false); for (index = 0; index < m_buttons->size(); index++) @@ -812,13 +812,13 @@ void QuickLauncher::loadConfig() DEBUGSTR << " ConserveSpace=" << (m_manager->conserveSpace()) << endl << flush; DEBUGSTR << " DragEnabled=" << isDragEnabled() << endl << flush;*/ - QStringList volatileButtons = m_settings->volatileButtons(); - QStringList urls = m_settings->buttons(); + TQStringList volatileButtons = m_settings->volatileButtons(); + TQStringList urls = m_settings->buttons(); kdDebug() << "GetButtons " << urls.join("/") << endl; - QStringList::Iterator iter(urls.begin()); + TQStringList::Iterator iter(urls.begin()); int n = 0; while (iter != urls.end()) { - QString url = *iter; + TQString url = *iter; addApp(url, n, false); ++iter; ++n; @@ -838,8 +838,8 @@ void QuickLauncher::loadConfig() m_popularity->readConfig(m_settings); m_popularity->setHistoryHorizon(m_settings->historyHorizon()/100.0); - QStringList serviceNames = m_settings->serviceNames(); - QValueList<int> insPos = m_settings->serviceInspos(); + TQStringList serviceNames = m_settings->serviceNames(); + TQValueList<int> insPos = m_settings->serviceInspos(); for (int n=std::min(serviceNames.size(),insPos.size())-1; n>=0; --n) { m_appOrdering[serviceNames[n]] = insPos[n]; @@ -853,7 +853,7 @@ void QuickLauncher::saveConfig() m_needsSave=true; return; } - QStringList urls, volatileUrls; + TQStringList urls, volatileUrls; ButtonIter iter = m_buttons->begin(); while (iter != m_buttons->end()) { if ((*iter)->sticky() == false) @@ -872,8 +872,8 @@ void QuickLauncher::saveConfig() m_popularity->writeConfig(m_settings); // m_popularity must have written the current service list by now - QStringList serviceNames = m_settings->serviceNames(); - QValueList<int> insertionPositions; + TQStringList serviceNames = m_settings->serviceNames(); + TQValueList<int> insertionPositions; for (int n=0; n<int(serviceNames.size()); ++n) { if (m_appOrdering.find(serviceNames[n]) != m_appOrdering.end()) @@ -901,25 +901,25 @@ void QuickLauncher::setRefreshEnabled(bool enable) } } -void QuickLauncher::serviceStartedByStorageId(QString /*starter*/, QString storageId) +void QuickLauncher::serviceStartedByStorageId(TQString /*starter*/, TQString storageId) { KService::Ptr service = KService::serviceByStorageId(storageId); - if (service->icon() == QString::null) + if (service->icon() == TQString::null) { kdDebug() << storageId << " has no icon. Makes no sense to add it."; return; } QuickURL url = QuickURL(locate("apps", service->desktopEntryPath())); - QString desktopMenuId(url.menuId()); + TQString desktopMenuId(url.menuId()); kdDebug() << "storageId=" << storageId << " desktopURL=" << desktopMenuId << endl; // A service was started somwhere else. If the quicklauncher contains // this service too, we flash the icon QuickButton *startedButton = 0; - std::set<QString> buttonIdSet; + std::set<TQString> buttonIdSet; for (uint n = 0; n < m_buttons->size(); ++n) { QuickButton *button = (*m_buttons)[n]; - QString buttonMenuId = button->menuId(); + TQString buttonMenuId = button->menuId(); buttonIdSet.insert(buttonMenuId); if (desktopMenuId == buttonMenuId) { @@ -936,7 +936,7 @@ void QuickLauncher::serviceStartedByStorageId(QString /*starter*/, QString stora if (m_settings->autoAdjustEnabled()) { - QTimer::singleShot(0, this, SLOT(slotAdjustToCurrentPopularity())); + TQTimer::singleShot(0, this, TQT_SLOT(slotAdjustToCurrentPopularity())); } } @@ -958,8 +958,8 @@ void QuickLauncher::slotAdjustToCurrentPopularity() minAddPopularity += (belowAvgAllowed * stats->popularityByRank(n)) / maxItems; } double minDelPopularity = minAddPopularity * hysteresisFactor; - std::map<QString, QuickButton*> removeableApps; - std::set<QString> existingApps; + std::map<TQString, QuickButton*> removeableApps; + std::set<TQString> existingApps; int numApps = m_buttons->size(); for (int n = 0; n < int(m_buttons->size()); ++n) { @@ -978,7 +978,7 @@ void QuickLauncher::slotAdjustToCurrentPopularity() (numApps < maxItems && stats->popularityByRank(n) > minAddPopularity); ++n) { - QString app = m_popularity->serviceByRank(n); + TQString app = m_popularity->serviceByRank(n); if (existingApps.find(app) == existingApps.end()) { addApp(QuickURL(m_popularity->serviceByRank(n)).url(), false); @@ -1005,12 +1005,12 @@ void QuickLauncher::slotAdjustToCurrentPopularity() m_saveTimer->start(10000,true); } -void QuickLauncher::slotOwnServiceExecuted(QString serviceMenuId) +void QuickLauncher::slotOwnServiceExecuted(TQString serviceMenuId) { m_popularity->useService(serviceMenuId); if (m_settings->autoAdjustEnabled()) { - QTimer::singleShot(0, this, SLOT(slotAdjustToCurrentPopularity())); + TQTimer::singleShot(0, this, TQT_SLOT(slotAdjustToCurrentPopularity())); } } @@ -1019,25 +1019,25 @@ void QuickLauncher::updateStickyHighlightLayer() // Creates a transparent image which is used // to highlight those buttons which will never // be removed automatically from the launcher - QPixmap areaPix(width(), height()); - QPainter areaPixPainter(&areaPix); - areaPixPainter.fillRect(0, 0, width(), height(), QColor(255, 255, 255)); - QSize itemSize = m_manager->itemSize(); - QSize spaceSize = m_manager->spaceSize(); + TQPixmap areaPix(width(), height()); + TQPainter areaPixPainter(&areaPix); + areaPixPainter.fillRect(0, 0, width(), height(), TQColor(255, 255, 255)); + TQSize itemSize = m_manager->itemSize(); + TQSize spaceSize = m_manager->spaceSize(); for (uint n=0; n<m_buttons->size(); ++n) { - QPoint pos = m_manager->pos(n); + TQPoint pos = m_manager->pos(n); if ((*m_buttons)[n]->sticky() == false) { areaPixPainter.fillRect(pos.x()-(spaceSize.width()+1)/2, pos.y()-(spaceSize.height()+1)/2, itemSize.width()+spaceSize.width()+1, itemSize.height()+spaceSize.height()+1, - QColor(0, 0, 0)); + TQColor(0, 0, 0)); } } - QImage areaLayer = areaPix.convertToImage(); - m_stickyHighlightLayer = QImage(width(), height(), 32); + TQImage areaLayer = areaPix.convertToImage(); + m_stickyHighlightLayer = TQImage(width(), height(), 32); m_stickyHighlightLayer.setAlphaBuffer(true); int pix, tlPix, brPix, w(width()), h(height()); QRgb transparent(qRgba(0, 0, 0, 0)); @@ -1063,14 +1063,14 @@ void QuickLauncher::updateStickyHighlightLayer() repaint(); } -void QuickLauncher::paintEvent(QPaintEvent* e) +void QuickLauncher::paintEvent(TQPaintEvent* e) { KPanelApplet::paintEvent(e); if (m_settings->autoAdjustEnabled() && m_settings->showVolatileButtonIndicator()) { - QPainter p(this); + TQPainter p(this); p.drawImage(0, 0, m_stickyHighlightLayer); } } diff --git a/kicker/applets/launcher/quicklauncher.h b/kicker/applets/launcher/quicklauncher.h index c82d39661..bb53cfa9c 100644 --- a/kicker/applets/launcher/quicklauncher.h +++ b/kicker/applets/launcher/quicklauncher.h @@ -25,9 +25,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define __quicklauncher_h__ #include <dcopobject.h> -#include <qimage.h> -#include <qstring.h> -#include <qvaluevector.h> +#include <tqimage.h> +#include <tqstring.h> +#include <tqvaluevector.h> #include <kpanelapplet.h> #include <map> @@ -49,7 +49,7 @@ class QuickLauncher: public KPanelApplet, public DCOPObject K_DCOP k_dcop: - void serviceStartedByStorageId(QString starter, QString storageId); + void serviceStartedByStorageId(TQString starter, TQString storageId); public: enum {DEFAULT_ICON_DIM=QuickButton::DEFAULT_ICON_DIM}; @@ -59,34 +59,34 @@ public: float popularity; }; - QuickLauncher(const QString& configFile, Type t = Normal, int actions = 0, - QWidget *parent = 0, const char *name = 0); + QuickLauncher(const TQString& configFile, Type t = Normal, int actions = 0, + TQWidget *parent = 0, const char *name = 0); ~QuickLauncher(); int widthForHeight(int height) const; int heightForWidth(int width) const; - void addApp(QString url, int index, bool manuallyAdded); + void addApp(TQString url, int index, bool manuallyAdded); virtual void action(Action a); public slots: - void addApp(QString url, bool manuallyAdded); - void addAppBeforeManually(QString url, QString sender); + void addApp(TQString url, bool manuallyAdded); + void addAppBeforeManually(TQString url, TQString sender); void removeAppManually(QuickButton *button); - void removeApp(QString url, bool manuallyRemoved); + void removeApp(TQString url, bool manuallyRemoved); void removeApp(int index, bool manuallyRemoved); void removeAppManually(int index); void saveConfig(); void about(); protected: - int findApp(QString url); + int findApp(TQString url); int findApp(QuickButton *button); - void mousePressEvent(QMouseEvent *e); - void resizeEvent(QResizeEvent*); - void dragEnterEvent(QDragEnterEvent *e); - void dragLeaveEvent(QDragLeaveEvent *e); - void dragMoveEvent(QDragMoveEvent *e); - void dropEvent(QDropEvent *e); + void mousePressEvent(TQMouseEvent *e); + void resizeEvent(TQResizeEvent*); + void dragEnterEvent(TQDragEnterEvent *e); + void dragLeaveEvent(TQDragLeaveEvent *e); + void dragMoveEvent(TQDragMoveEvent *e); + void dropEvent(TQDropEvent *e); void refreshContents(); void setRefreshEnabled(bool enable); void setConserveSpace(bool conserve_space); @@ -106,33 +106,33 @@ protected slots: void slotConfigure(); void slotSettingsDialogChanged(); void fillRemoveAppsMenu(); - void slotOwnServiceExecuted(QString serviceMenuId); + void slotOwnServiceExecuted(TQString serviceMenuId); void slotAdjustToCurrentPopularity(); void slotStickyToggled(); protected: void updateInsertionPosToStatusQuo(); void updateStickyHighlightLayer(); - QuickButton* createButton(QString url); - virtual void paintEvent(QPaintEvent* e); + QuickButton* createButton(TQString url); + virtual void paintEvent(TQPaintEvent* e); virtual void positionChange(Position); - QPopupMenu *m_popup; - QPopupMenu *m_appletPopup; - QPopupMenu *m_removeAppsMenu; + TQPopupMenu *m_popup; + TQPopupMenu *m_appletPopup; + TQPopupMenu *m_removeAppsMenu; QuickButtonGroup *m_buttons, *m_newButtons, *m_oldButtons, *m_dragButtons; int m_space, m_border; - QSize m_buttonSize; + TQSize m_buttonSize; FlowGridManager *m_manager; int m_dropLen, m_dropPos, m_minPanelDim; bool m_dragAccepted, m_refreshEnabled, m_needsSave, m_needsRefresh; - std::map<QString, int> m_appOrdering; + std::map<TQString, int> m_appOrdering; Prefs* m_settings; KAction *m_configAction; ConfigDlg *m_configDialog; PopularityStatistics* m_popularity; - QImage m_stickyHighlightLayer; - QTimer *m_saveTimer; + TQImage m_stickyHighlightLayer; + TQTimer *m_saveTimer; }; #endif |