author | drw <drw> | 2005-05-16 17:49:55 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-16 17:49:55 (UTC) |
commit | d54ee25eca9a9e8d38e342828aa21589dc523ce3 (patch) (side-by-side diff) | |
tree | 89bc093b7696bd42b0e7fa3b88bca1890f002bcf /noncore/apps/dagger/navbar.cpp | |
parent | d2426de3452342ab4af8e95214b9ff408f30744e (diff) | |
download | opie-d54ee25eca9a9e8d38e342828aa21589dc523ce3.zip opie-d54ee25eca9a9e8d38e342828aa21589dc523ce3.tar.gz opie-d54ee25eca9a9e8d38e342828aa21589dc523ce3.tar.bz2 |
Resource -> OResource
Diffstat (limited to 'noncore/apps/dagger/navbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/dagger/navbar.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/noncore/apps/dagger/navbar.cpp b/noncore/apps/dagger/navbar.cpp index ac49613..b28c677 100644 --- a/noncore/apps/dagger/navbar.cpp +++ b/noncore/apps/dagger/navbar.cpp @@ -1,105 +1,108 @@ /* Dagger - A Bible study program utilizing the Sword library. Copyright (c) 2004 Dan Williams <drw@handhelds.org> This file 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. This file 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this file; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "navbar.h" #include <opie2/oresource.h> #include <qpe/config.h> #include <qpe/resource.h> #include <qaction.h> #include <qlineedit.h> #include <qwhatsthis.h> -using Opie::Core::OResource; - NavBar::NavBar( QMainWindow *parent ) : QToolBar( QString::null, parent, QMainWindow::Top, true ) { // Initialize UI - m_actionPrevPage = new QAction( tr( "Previous page" ), OResource::loadPixmap( "fastback", OResource::SmallIcon ), + m_actionPrevPage = new QAction( tr( "Previous page" ), + Opie::Core::OResource::loadPixmap( "fastback", Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); m_actionPrevPage->setWhatsThis( tr( "Tap here to scroll backward one page." ) ); m_actionPrevPage->addTo( this ); connect( m_actionPrevPage, SIGNAL(activated()), this, SIGNAL(prevPage()) ); - m_actionPrevVerse = new QAction( tr( "Previous verse" ), OResource::loadPixmap( "back", OResource::SmallIcon ), + m_actionPrevVerse = new QAction( tr( "Previous verse" ), + Opie::Core::OResource::loadPixmap( "back", Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); m_actionPrevVerse->setWhatsThis( tr( "Tap here to scroll backward one verse." ) ); m_actionPrevVerse->addTo( this ); connect( m_actionPrevVerse, SIGNAL(activated()), this, SIGNAL(prevVerse()) ); m_key = new QLineEdit( this ); setStretchableWidget( m_key ); QWhatsThis::add( m_key, tr( "Enter location to display here." ) ); connect(m_key, SIGNAL(textChanged(const QString &)), this, SIGNAL(keyChanged(const QString &)) ); - m_actionNextVerse = new QAction( tr( "Next verse" ), OResource::loadPixmap( "forward", OResource::SmallIcon ), + m_actionNextVerse = new QAction( tr( "Next verse" ), + Opie::Core::OResource::loadPixmap( "forward", Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); m_actionNextVerse->setWhatsThis( tr( "Tap here to scroll forward one verse." ) ); m_actionNextVerse->addTo( this ); connect( m_actionNextVerse, SIGNAL(activated()), this, SIGNAL(nextVerse()) ); - m_actionNextPage = new QAction( tr( "Next page" ), OResource::loadPixmap( "fastforward", OResource::SmallIcon ), - QString::null, 0, this, 0 ); + m_actionNextPage = new QAction( tr( "Next page" ), + Opie::Core::OResource::loadPixmap( "fastforward", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); m_actionNextPage->setWhatsThis( tr( "Tap here to scroll forward one page." ) ); m_actionNextPage->addTo( this ); connect( m_actionNextPage, SIGNAL(activated()), this, SIGNAL(nextPage()) ); addSeparator(); m_scrollRate = new QSpinBox( 1, 100, 1, this ); m_scrollRate->setMinimumWidth( 35 ); QWhatsThis::add( m_scrollRate, tr( "Adjust auto-scroll rate here. A larger value represents a slower scrolling rate." ) ); connect( m_scrollRate, SIGNAL(valueChanged(int)), this, SIGNAL(scrollRateChanged(int)) ); - m_actionScroll = new QAction( tr( "Auto-scroll" ), OResource::loadPixmap( "dagger/autoscroll", OResource::SmallIcon ), + m_actionScroll = new QAction( tr( "Auto-scroll" ), + Opie::Core::OResource::loadPixmap( "dagger/autoscroll", Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); m_actionScroll->setToggleAction( true ); m_actionScroll->setWhatsThis( tr( "Tap here to start or stop auto-scrolling." ) ); connect( m_actionScroll, SIGNAL(toggled(bool)), this, SIGNAL(autoScroll(bool)) ); m_actionScroll->addTo( this ); if ( parent ) { installEventFilter( parent ); m_key->installEventFilter( parent ); } } void NavBar::navBtnsEnable( bool enabled ) { m_actionPrevPage->setEnabled( enabled ); m_actionPrevVerse->setEnabled( enabled ); m_actionNextVerse->setEnabled( enabled ); m_actionNextPage->setEnabled( enabled ); m_scrollRate->setEnabled( enabled ); m_actionScroll->setEnabled( enabled ); } void NavBar::setKey( const QString &newKey ) { disconnect( m_key, SIGNAL(textChanged(const QString &)), 0, 0 ); m_key->setText( newKey ); connect(m_key, SIGNAL(textChanged(const QString &)), this, SIGNAL(keyChanged(const QString &)) ); } void NavBar::setAutoScrollRate( int scrollRate ) { m_scrollRate->setValue( scrollRate ); } |