diff options
Diffstat (limited to 'src/cpufreqd')
-rw-r--r-- | src/cpufreqd/cpufreqd.cpp | 38 | ||||
-rw-r--r-- | src/cpufreqd/cpufreqd.h | 33 | ||||
-rw-r--r-- | src/cpufreqd/cpufreqdconnection.cpp | 8 | ||||
-rw-r--r-- | src/cpufreqd/cpufreqdconnection.h | 6 | ||||
-rw-r--r-- | src/cpufreqd/cpufreqdprofile.cpp | 10 | ||||
-rw-r--r-- | src/cpufreqd/cpufreqdprofile.h | 12 |
6 files changed, 54 insertions, 53 deletions
diff --git a/src/cpufreqd/cpufreqd.cpp b/src/cpufreqd/cpufreqd.cpp index 833db29..b5f1ad0 100644 --- a/src/cpufreqd/cpufreqd.cpp +++ b/src/cpufreqd/cpufreqd.cpp @@ -19,9 +19,9 @@ ***************************************************************************/ #include "cpufreqd.h" -#include <qdir.h> -#include <qkeysequence.h> -#include <qstringlist.h> +#include <tqdir.h> +#include <tqkeysequence.h> +#include <tqstringlist.h> #include <klocale.h> #define CHUNK_SIZE 4096 @@ -35,22 +35,22 @@ */ CPUFreqd::CPUFreqd() { - m_menu = new QPopupMenu(); - QObject::connect(m_menu, SIGNAL(aboutToShow()), this, SLOT(updateMenu())); + m_menu = new TQPopupMenu(); + TQObject::connect(m_menu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(updateMenu())); - m_dynamic = new QAction(i18n("Select dynamically"), QKeySequence(), this); - QObject::connect(m_dynamic, SIGNAL(activated()), this, SLOT(setDynamic())); + m_dynamic = new TQAction(i18n("Select dynamically"), TQKeySequence(), this); + TQObject::connect(m_dynamic, TQT_SIGNAL(activated()), this, TQT_SLOT(setDynamic())); m_dynamic->setToggleAction(true); m_dynamic->setOn(true); - m_items = new QActionGroup(this); + m_items = new TQActionGroup(this); m_items->setExclusive(true); - m_actions = new QPtrList<QAction>(); + m_actions = new TQPtrList<TQAction>(); m_actions->setAutoDelete(true); - m_mapper = new QSignalMapper(this); - QObject::connect(m_mapper, SIGNAL(mapped(int)), this, SLOT(setProfile(int))); + m_mapper = new TQSignalMapper(this); + TQObject::connect(m_mapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(setProfile(int))); } CPUFreqd::~CPUFreqd() { @@ -60,9 +60,9 @@ bool CPUFreqd::enabled() const { return m_conn.available(); } -QValueVector<CPUFreqdProfile> & CPUFreqd::getProfiles(bool reconnect) { +TQValueVector<CPUFreqdProfile> & CPUFreqd::getProfiles(bool reconnect) { char chunk[CHUNK_SIZE]; - QString buffer; + TQString buffer; if (!m_profiles.empty()) m_profiles.clear(); @@ -84,8 +84,8 @@ QValueVector<CPUFreqdProfile> & CPUFreqd::getProfiles(bool reconnect) { buffer.append(chunk); } - QStringList profiles = QStringList::split("\n", buffer); - for (QStringList::Iterator it = profiles.begin(); it != profiles.end(); it++) + TQStringList profiles = TQStringList::split("\n", buffer); + for (TQStringList::Iterator it = profiles.begin(); it != profiles.end(); it++) m_profiles.push_back( CPUFreqdProfile(*it) ); m_conn.close(); @@ -93,12 +93,12 @@ QValueVector<CPUFreqdProfile> & CPUFreqd::getProfiles(bool reconnect) { return m_profiles; } -QPopupMenu* CPUFreqd::menu() { +TQPopupMenu* CPUFreqd::menu() { return m_menu; } void CPUFreqd::updateMenu() { - QAction *cur; + TQAction *cur; m_menu->clear(); m_actions->clear(); @@ -110,8 +110,8 @@ void CPUFreqd::updateMenu() { for (unsigned int i = 0; i < m_profiles.count(); i++) if (m_profiles[i].isValid()) { - cur = new QAction(m_profiles[i].name(), QKeySequence(), m_items); - QObject::connect(cur, SIGNAL(activated()), m_mapper, SLOT(map())); + cur = new TQAction(m_profiles[i].name(), TQKeySequence(), m_items); + TQObject::connect(cur, TQT_SIGNAL(activated()), m_mapper, TQT_SLOT(map())); cur->setToggleAction(true); cur->setOn(m_profiles[i].active()); diff --git a/src/cpufreqd/cpufreqd.h b/src/cpufreqd/cpufreqd.h index 42e4b0e..dc0a67b 100644 --- a/src/cpufreqd/cpufreqd.h +++ b/src/cpufreqd/cpufreqd.h @@ -22,25 +22,26 @@ #include "cpufreqdconnection.h" #include "cpufreqdprofile.h" -#include <qaction.h> -#include <qobject.h> -#include <qpopupmenu.h> -#include <qstring.h> -#include <qsignalmapper.h> -#include <qvaluevector.h> -#include <qptrlist.h> +#include <tqaction.h> +#include <tqobject.h> +#include <tqpopupmenu.h> +#include <tqstring.h> +#include <tqsignalmapper.h> +#include <tqvaluevector.h> +#include <tqptrlist.h> #include <stdint.h> -class CPUFreqd: public QObject { +class CPUFreqd: public TQObject { Q_OBJECT + TQ_OBJECT public: CPUFreqd(); virtual ~CPUFreqd(); bool enabled() const; - QValueVector<CPUFreqdProfile> & getProfiles(bool reconnect = false); - QPopupMenu* menu(); + TQValueVector<CPUFreqdProfile> & getProfiles(bool reconnect = false); + TQPopupMenu* menu(); public slots: void setManual(); @@ -49,12 +50,12 @@ class CPUFreqd: public QObject { private: CPUFreqdConnection m_conn; - QValueVector<CPUFreqdProfile> m_profiles; - QPopupMenu *m_menu; - QSignalMapper *m_mapper; - QAction* m_dynamic; - QActionGroup* m_items; - QPtrList<QAction>* m_actions; + TQValueVector<CPUFreqdProfile> m_profiles; + TQPopupMenu *m_menu; + TQSignalMapper *m_mapper; + TQAction* m_dynamic; + TQActionGroup* m_items; + TQPtrList<TQAction>* m_actions; void setMode(uint32_t mode); diff --git a/src/cpufreqd/cpufreqdconnection.cpp b/src/cpufreqd/cpufreqdconnection.cpp index 4c9ee03..7820029 100644 --- a/src/cpufreqd/cpufreqdconnection.cpp +++ b/src/cpufreqd/cpufreqdconnection.cpp @@ -20,7 +20,7 @@ #include "cpufreqdconnection.h" -#include <qdir.h> +#include <tqdir.h> #include <fcntl.h> #include <stdlib.h> @@ -36,7 +36,7 @@ * Hrvoje Zeba <[email protected]> * * Format: - * it is an uint32_t used as bitmask + * it is an uint32_t used as bittqmask * * 31-16 15-0 * <command> <arguments> @@ -110,8 +110,8 @@ bool CPUFreqdConnection::available() const { } bool CPUFreqdConnection::lookup() { - QString candidate; - QDir tmp("/tmp", "cpufreqd-*", QDir::Time, QDir::Dirs); + TQString candidate; + TQDir tmp("/tmp", "cpufreqd-*", TQDir::Time, TQDir::Dirs); if (tmp.count()) candidate = "/tmp/" + tmp[0] + "/cpufreqd"; diff --git a/src/cpufreqd/cpufreqdconnection.h b/src/cpufreqd/cpufreqdconnection.h index 4f15ad8..28ab2bc 100644 --- a/src/cpufreqd/cpufreqdconnection.h +++ b/src/cpufreqd/cpufreqdconnection.h @@ -20,7 +20,7 @@ #ifndef CPUFREQDCONNECTION_H #define CPUFREQDCONNECTION_H -#include <qstring.h> +#include <tqstring.h> #include <stdint.h> /* Excerpt from cpufreqd_remote.h (cpufreqd-2.0.0) @@ -29,7 +29,7 @@ * Hrvoje Zeba <[email protected]> * * Format: - * it is an uint32_t used as bitmask + * it is an uint32_t used as bittqmask * * 31-16 15-0 * <command> <arguments> @@ -62,7 +62,7 @@ class CPUFreqdConnection{ bool lookup(); private: - QString m_socket; + TQString m_socket; int m_fd; }; diff --git a/src/cpufreqd/cpufreqdprofile.cpp b/src/cpufreqd/cpufreqdprofile.cpp index 96d7fe6..e899df7 100644 --- a/src/cpufreqd/cpufreqdprofile.cpp +++ b/src/cpufreqd/cpufreqdprofile.cpp @@ -19,15 +19,15 @@ ***************************************************************************/ #include "cpufreqdprofile.h" -#include <qstringlist.h> +#include <tqstringlist.h> /** * This class encapsulates cpufreqd profile data: name, frequencies and governors *@author: Valentine Sinitsyn ([email protected]) */ -CPUFreqdProfile::CPUFreqdProfile(QString & descr) { - QStringList fields = QStringList::split("/", descr); +CPUFreqdProfile::CPUFreqdProfile(TQString & descr) { + TQStringList fields = TQStringList::split("/", descr); //@fixme: if name contains a slash, the results will be incorrect if (fields.count() == 5) { @@ -50,7 +50,7 @@ bool CPUFreqdProfile::active() const { return (m_active == 1); } -const QString & CPUFreqdProfile::name() const { +const TQString & CPUFreqdProfile::name() const { return m_name; } @@ -62,6 +62,6 @@ int CPUFreqdProfile::maxfreq() const { return m_maxfreq; } -const QString & CPUFreqdProfile::policy() const { +const TQString & CPUFreqdProfile::policy() const { return m_policy; } diff --git a/src/cpufreqd/cpufreqdprofile.h b/src/cpufreqd/cpufreqdprofile.h index f57e36d..93c9aab 100644 --- a/src/cpufreqd/cpufreqdprofile.h +++ b/src/cpufreqd/cpufreqdprofile.h @@ -20,29 +20,29 @@ #ifndef CPUFREQDPROFILE_H #define CPUFREQDPROFILE_H -#include <qstring.h> +#include <tqstring.h> class CPUFreqdProfile { public: CPUFreqdProfile() {}; - CPUFreqdProfile(QString & descr); + CPUFreqdProfile(TQString & descr); virtual ~CPUFreqdProfile(); bool isValid() const; bool active() const; - const QString & name() const; + const TQString & name() const; int minfreq() const; int maxfreq() const; - const QString & policy() const; + const TQString & policy() const; private: int m_active; - QString m_name; + TQString m_name; int m_id; int m_minfreq; int m_maxfreq; - QString m_policy; + TQString m_policy; }; #endif |