author | ar <ar> | 2004-06-03 19:02:20 (UTC) |
---|---|---|
committer | ar <ar> | 2004-06-03 19:02:20 (UTC) |
commit | 74109985fd9ebdffd6cf0416207a69b17b563fd6 (patch) (side-by-side diff) | |
tree | a06b7bc9bd5e90dc48174fd77775842cce003110 | |
parent | 25c5d7d615d1f476f206a40892877e259eeb365c (diff) | |
download | opie-74109985fd9ebdffd6cf0416207a69b17b563fd6.zip opie-74109985fd9ebdffd6cf0416207a69b17b563fd6.tar.gz opie-74109985fd9ebdffd6cf0416207a69b17b563fd6.tar.bz2 |
- convert to odebug framework
3 files changed, 13 insertions, 9 deletions
diff --git a/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp b/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp index 5c7bac2..6d2c773 100644 --- a/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp +++ b/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp @@ -91,38 +91,38 @@ TestMainWindow::TestMainWindow( QWidget* parent, const char* slot, WFlags fl ) m_manager->addKeyConfig( Opie::Core::OKeyConfigItem( tr( "Show Action" ), "show_key", QPixmap(), 11, Opie::Core::OKeyPair( Qt::Key_S, Qt::AltButton ) ) ); connect(m_manager, SIGNAL(actionActivated(QWidget*,QKeyEvent*,const Opie::Core::OKeyConfigItem&)), this, SLOT(slotAction(QWidget*, QKeyEvent*, const Opie::Core::OKeyConfigItem&)) ); // when commenting the line below out the keyPressEvent will work m_manager->handleWidget( this ); m_manager->load(); } TestMainWindow::~TestMainWindow() { m_manager->save(); delete m_config; } Opie::Core::OKeyConfigManager* TestMainWindow::manager() { return m_manager; } /* * This only works if we do not handle the even with m_manager->handleWidget( this ) * So this is only for demo purposes */ void TestMainWindow::keyPressEvent( QKeyEvent* ev ) { - qWarning( "String is "+ m_manager->handleKeyEvent( ev ).text() ); - qWarning( "Id was %d %d %d %d", m_manager->handleKeyEventId( ev ),ev->key(),ev->state(), ev->ascii() ); + owarn << "String is "+ m_manager->handleKeyEvent( ev ).text() << oendl; + owarn << "Id was " << m_manager->handleKeyEventId( ev ) << " " << ev->key() << " " << ev->state() << " " << ev->ascii() << "" << oendl; ev->ignore(); } void TestMainWindow::slotDelete( QWidget* wid, QKeyEvent* ev ) { - qWarning( "Slot Delete %d %d %d", wid, ev->key(), ev->state() ); + owarn << "Slot Delete " << wid << " " << ev->key() << " " << ev->state() << "" << oendl; } void TestMainWindow::slotAction( QWidget* wid, QKeyEvent* ev, const Opie::Core::OKeyConfigItem& item) { - qWarning( "Slot Action %d %d %d %s %d", wid, ev->key(), ev->state(), item.text().latin1(), item.id() ); + owarn << "Slot Action " << wid << " " << ev->key() << " " << ev->state() << " " << item.text() << " " << item.id() << "" << oendl; } #include "testwidget.moc" diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp index 7834b3b..4c05620 100644 --- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp +++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp @@ -10,73 +10,77 @@ .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "olistviewdemo.h" + +/* OPIE */ #include <opie2/olistview.h> +#include <opie2/odebug.h> +/* QT */ #include <qstring.h> #include <qpixmap.h> #include <qlistview.h> using namespace Opie::Ui; OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f ) :QVBox( parent, name, f ) { lv = new ONamedListView( this ); lv->setRootIsDecorated( true ); lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) ); ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); item->setText( "Column2", "ModifiedText" ); item->setText( "Column5", "ThisColumnDoesNotExits" ); new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Minni" ) ); item = new ONamedListViewItem( lv, QStringList::split( ' ', "XXX YYY ZZZ ***" ) ); new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComes" ) ); item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComesSoon" ) ); item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 Mickey" ) ); if ( lv->find( 3, "Mickey", 3 ) ) - qDebug( "found Mickey :-)" ); + odebug << "found Mickey :-)" << oendl; else - qDebug( "did not found Mickey :-(" ); + odebug << "did not found Mickey :-(" << oendl; if ( lv->find( 3, "Minni", 0 ) ) - qDebug( "found Minni :-)" ); + odebug << "found Minni :-)" << oendl; else - qDebug( "did not found Minni :-(" ); + odebug << "did not found Minni :-(" << oendl; } OListViewDemo::~OListViewDemo() { } diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp index 6443dc0..d747bd9 100644 --- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp +++ b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp @@ -53,29 +53,29 @@ ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) m_messages->addColumn(" Messages "); folder1 = new QListView( splitti ); folder1->addColumn( "Messages 2 " ); splitti->addWidget(m_messages, "mail", tr("Mails") ); splitti->addWidget(folder1, "folder", tr("Folder") ); splitti->addWidget( lbl, "logo", tr("Label") ); m_message = lbl; m_splitter->addWidget( splitti ); } ListViews::~ListViews() { } bool ListViews::eventFilter( QObject* obj, QEvent* ev ) { if (!obj->isWidgetType() ) return false; if ( ev->type() == QEvent::MouseButtonRelease ) { - qWarning(" name %s, class %s", obj->name(), obj->className() ); + owarn << " name " << obj->name() << ", class " << obj->className() << "" << oendl; } return false; } |