summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/profile.cpp
authorzecke <zecke>2002-10-09 14:25:38 (UTC)
committer zecke <zecke>2002-10-09 14:25:38 (UTC)
commitf9f2d227b3cfbc2187b4f7f535fc59f9735798d0 (patch) (unidiff)
tree7645623f7dde640222fab3e5ff0af0af3ae2f882 /noncore/apps/opie-console/profile.cpp
parentff0caad7ea46d19f7a7916047fd0914f6f100dde (diff)
downloadopie-f9f2d227b3cfbc2187b4f7f535fc59f9735798d0.zip
opie-f9f2d227b3cfbc2187b4f7f535fc59f9735798d0.tar.gz
opie-f9f2d227b3cfbc2187b4f7f535fc59f9735798d0.tar.bz2
A small testsuite
the stuff from the remote goes to the stdout There is a send button and a multilineedit be sure to hit \n before sending... Some debug code... in some files debugged IOSerial it should be fine now
Diffstat (limited to 'noncore/apps/opie-console/profile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/profile.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/profile.cpp b/noncore/apps/opie-console/profile.cpp
index 1a94619..ffd672e 100644
--- a/noncore/apps/opie-console/profile.cpp
+++ b/noncore/apps/opie-console/profile.cpp
@@ -57,51 +57,53 @@ int Profile::terminal()const {
57} 57}
58void Profile::setName( const QString& str ) { 58void Profile::setName( const QString& str ) {
59 m_name = str; 59 m_name = str;
60} 60}
61void Profile::setIOLayer( const QCString& name ) { 61void Profile::setIOLayer( const QCString& name ) {
62 m_ioLayer = name; 62 m_ioLayer = name;
63} 63}
64void Profile::setTerminalName( const QCString& str ) { 64void Profile::setTerminalName( const QCString& str ) {
65 m_term = str; 65 m_term = str;
66} 66}
67void Profile::setBackground( int back ) { 67void Profile::setBackground( int back ) {
68 m_back = back; 68 m_back = back;
69} 69}
70void Profile::setForeground( int fore ) { 70void Profile::setForeground( int fore ) {
71 m_fore = fore; 71 m_fore = fore;
72} 72}
73void Profile::setTerminal( int term ) { 73void Profile::setTerminal( int term ) {
74 m_terminal = term; 74 m_terminal = term;
75} 75}
76/* config stuff */ 76/* config stuff */
77void Profile::clearConf() { 77void Profile::clearConf() {
78 m_conf.clear(); 78 m_conf.clear();
79} 79}
80void Profile::writeEntry( const QString& key, const QString& value ) { 80void Profile::writeEntry( const QString& key, const QString& value ) {
81 qWarning("key %s value %s", key.latin1(), value.latin1() );
81 m_conf.replace( key, value ); 82 m_conf.replace( key, value );
82} 83}
83void Profile::writeEntry( const QString& key, int num ) { 84void Profile::writeEntry( const QString& key, int num ) {
85 qWarning("num");
84 writeEntry( key, QString::number( num ) ); 86 writeEntry( key, QString::number( num ) );
85} 87}
86void Profile::writeEntry( const QString& key, bool b ) { 88void Profile::writeEntry( const QString& key, bool b ) {
87 writeEntry( key, QString::number(b) ); 89 writeEntry( key, QString::number(b) );
88} 90}
89void Profile::writeEntry( const QString& key, const QStringList& lis, const QChar& sep ) { 91void Profile::writeEntry( const QString& key, const QStringList& lis, const QChar& sep ) {
90 writeEntry( key, lis.join(sep) ); 92 writeEntry( key, lis.join(sep) );
91} 93}
92QString Profile::readEntry( const QString& key, const QString& deflt )const { 94QString Profile::readEntry( const QString& key, const QString& deflt )const {
93 QMap<QString, QString>::ConstIterator it; 95 QMap<QString, QString>::ConstIterator it;
94 it = m_conf.find( key ); 96 it = m_conf.find( key );
95 97
96 if ( it != m_conf.end() ) 98 if ( it != m_conf.end() )
97 return it.data(); 99 return it.data();
98 100
99 return deflt; 101 return deflt;
100} 102}
101int Profile::readNumEntry( const QString& key, int def )const { 103int Profile::readNumEntry( const QString& key, int def )const {
102 QMap<QString, QString>::ConstIterator it; 104 QMap<QString, QString>::ConstIterator it;
103 it = m_conf.find( key ); 105 it = m_conf.find( key );
104 106
105 if ( it != m_conf.end() ) { 107 if ( it != m_conf.end() ) {
106 bool ok; 108 bool ok;
107 int val = it.data().toInt(&ok); 109 int val = it.data().toInt(&ok);