-rw-r--r-- | libopie2/opieui/big-screen/obigscreen_p.h | 2 | ||||
-rw-r--r-- | libopie2/opieui/big-screen/osplitter.cpp | 6 | ||||
-rw-r--r-- | libopie2/opieui/big-screen/osplitter.h | 6 | ||||
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.cpp | 5 | ||||
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.h | 12 | ||||
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector_p.h | 2 | ||||
-rw-r--r-- | libopie2/opieui/ofontselector.cpp | 4 | ||||
-rw-r--r-- | libopie2/opieui/ofontselector.h | 4 | ||||
-rw-r--r-- | libopie2/opieui/okeyconfigwidget.cpp | 41 | ||||
-rw-r--r-- | libopie2/opieui/okeyconfigwidget.h | 8 | ||||
-rw-r--r-- | libopie2/opieui/okeyconfigwidget_p.h | 2 | ||||
-rw-r--r-- | libopie2/opieui/otaskbarapplet.h | 4 |
12 files changed, 49 insertions, 47 deletions
diff --git a/libopie2/opieui/big-screen/obigscreen_p.h b/libopie2/opieui/big-screen/obigscreen_p.h index a85a56c..baa2bbc 100644 --- a/libopie2/opieui/big-screen/obigscreen_p.h +++ b/libopie2/opieui/big-screen/obigscreen_p.h @@ -5,13 +5,13 @@ #include <qstring.h> class QWidget; namespace Opie { namespace Ui { -namespace Private{ +namespace Internal{ struct OSplitterContainer { bool operator==( const OSplitterContainer& o) const { if (widget != o.widget ) return false; diff --git a/libopie2/opieui/big-screen/osplitter.cpp b/libopie2/opieui/big-screen/osplitter.cpp index bcfd3a6..f0287ed 100644 --- a/libopie2/opieui/big-screen/osplitter.cpp +++ b/libopie2/opieui/big-screen/osplitter.cpp @@ -33,13 +33,13 @@ /* QT */ #include <qvaluelist.h> #include <qvbox.h> using namespace Opie::Ui; -using namespace Opie::Ui::Private; +using namespace Opie::Ui::Internal; /** * * This is the constructor of OSplitter * You might want to call setSizeChange to tell * OSplitter to change its layout when a specefic @@ -394,13 +394,13 @@ void OSplitter::resizeEvent( QResizeEvent* res ) } /* * Adds a container to a tab either the parent tab * or our own */ -void OSplitter::addToTab( const Opie::Ui::Private::OSplitterContainer& con ) +void OSplitter::addToTab( const Opie::Ui::Internal::OSplitterContainer& con ) { QWidget *wid = con.widget; // not needed widgetstack will reparent as well wid.reparent(m_tabWidget, wid->getWFlags(), QPoint(0, 0) ); if (m_parentTab ) m_parentTab->addTab( wid, con.icon, con.name ); else @@ -408,13 +408,13 @@ void OSplitter::addToTab( const Opie::Ui::Private::OSplitterContainer& con ) } /* * adds a container to the box */ -void OSplitter::addToBox( const Opie::Ui::Private::OSplitterContainer& con ) +void OSplitter::addToBox( const Opie::Ui::Internal::OSplitterContainer& con ) { QWidget* wid = con.widget; wid->reparent(m_hbox, 0, QPoint(0, 0) ); } diff --git a/libopie2/opieui/big-screen/osplitter.h b/libopie2/opieui/big-screen/osplitter.h index 7b5ea53..46dad05 100644 --- a/libopie2/opieui/big-screen/osplitter.h +++ b/libopie2/opieui/big-screen/osplitter.h @@ -70,13 +70,13 @@ class OTabWidget; * @author zecke */ class OSplitter : public QFrame { Q_OBJECT public: - typedef QValueList<Opie::Ui::Private::OSplitterContainer> ContainerList; + typedef QValueList<Opie::Ui::Internal::OSplitterContainer> ContainerList; OSplitter( Qt::Orientation = Horizontal, QWidget *parent = 0, const char* name = 0, WFlags fl = 0 ); ~OSplitter(); void setLabel( const QString& name ); void setIconName( const QString& name ); @@ -121,14 +121,14 @@ protected: private: /* true if OTabMode */ bool layoutMode()const; // void reparentAll(); void setTabWidget( OTabWidget*); - void addToTab( const Opie::Ui::Private::OSplitterContainer& ); - void addToBox( const Opie::Ui::Private::OSplitterContainer& ); + void addToTab( const Opie::Ui::Internal::OSplitterContainer& ); + void addToBox( const Opie::Ui::Internal::OSplitterContainer& ); void removeFromTab( QWidget* ); void changeTab(); void changeHBox(); void changeVBox(); void commonChangeBox(); QHBox *m_hbox; diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index c4d5033..a9ec8c4 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp @@ -1,6 +1,7 @@ + /* =. This file is part of the OPIE Project .=l. Copyright (C) 2002,2003 Holger Freyther <zecke@handhelds.org> .>+-= _;:, .> :=|. This library is free software; you can .> <`_, > . <= redistribute it and/or modify it under @@ -52,17 +53,17 @@ #include <qlistview.h> #include <qpopupmenu.h> #include <qwidgetstack.h> #include <qregexp.h> #include <qobjectlist.h> -using namespace Opie::Ui::Private; +using namespace Opie::Ui::Internal; namespace Opie { namespace Ui { -namespace Private { +namespace Internal { OFileViewInterface::OFileViewInterface( OFileSelector* selector ) : m_selector( selector ) {} OFileViewInterface::~OFileViewInterface() {} diff --git a/libopie2/opieui/fileselector/ofileselector.h b/libopie2/opieui/fileselector/ofileselector.h index 2205963..8bcd9ee 100644 --- a/libopie2/opieui/fileselector/ofileselector.h +++ b/libopie2/opieui/fileselector/ofileselector.h @@ -52,13 +52,13 @@ class QHBox; typedef QMap<QString, QStringList> MimeTypes; namespace Opie { namespace Ui { -namespace Private { +namespace Internal { class OFileViewInterface; class OFileViewFileListView; } /** @@ -72,14 +72,14 @@ class OFileViewFileListView; * @author zecke * @version 0.1 */ class OFileSelector : public QWidget { Q_OBJECT - friend class Private::OFileViewInterface; - friend class Private::OFileViewFileListView; + friend class Internal::OFileViewInterface; + friend class Internal::OFileViewFileListView; public: /** * The Mode of the Fileselector * Open = Open A File * Save = Save a File @@ -184,19 +184,19 @@ private: void initViews(); private: QLineEdit* m_lneEdit; // the LineEdit for the Name QComboBox *m_cmbView, *m_cmbMime; // two ComboBoxes to select the View and MimeType QWidgetStack* m_stack; // our widget stack which will contain the views - Private::OFileViewInterface* currentView() const; // returns the currentView - Private::OFileViewInterface* m_current; // here is the view saved + Internal::OFileViewInterface* currentView() const; // returns the currentView + Internal::OFileViewInterface* m_current; // here is the view saved bool m_shNew : 1; // should we show New? bool m_shClose : 1; // should we show Close? MimeTypes m_mimeType; // list of mimetypes - QMap<QString, Private::OFileViewInterface*> m_views; // QString translated view name + ViewInterface Ptr + QMap<QString, Internal::OFileViewInterface*> m_views; // QString translated view name + ViewInterface Ptr QHBox* m_nameBox; // the LineEdit + Label is hold here QHBox* m_cmbBox; // this holds the two combo boxes QString m_startDir; int m_mode; int m_selector; diff --git a/libopie2/opieui/fileselector/ofileselector_p.h b/libopie2/opieui/fileselector/ofileselector_p.h index 376dc98..a3ef8e2 100644 --- a/libopie2/opieui/fileselector/ofileselector_p.h +++ b/libopie2/opieui/fileselector/ofileselector_p.h @@ -56,13 +56,13 @@ typedef QMap<QString, QStringList> MimeTypes; class QFileInfo; class QToolButton; namespace Opie{ namespace Ui{ class OFileSelector; -namespace Private { +namespace Internal { class OFileViewInterface { public: OFileViewInterface( OFileSelector* selector ); virtual ~OFileViewInterface(); diff --git a/libopie2/opieui/ofontselector.cpp b/libopie2/opieui/ofontselector.cpp index b19c26e..6763ee6 100644 --- a/libopie2/opieui/ofontselector.cpp +++ b/libopie2/opieui/ofontselector.cpp @@ -38,13 +38,13 @@ #include <qlabel.h> #include <qmultilineedit.h> namespace Opie { namespace Ui { -namespace Private { +namespace Internal { class OFontSelectorPrivate { public: QListBox * m_font_family_list; QComboBox * m_font_style_list; @@ -93,13 +93,13 @@ private: } } } using namespace Opie::Ui; -using namespace Opie::Ui::Private; +using namespace Opie::Ui::Internal; static int findItemCB( QComboBox *box, const QString &str ) { for ( int i = 0; i < box->count(); i++ ) { if ( box->text ( i ) == str ) diff --git a/libopie2/opieui/ofontselector.h b/libopie2/opieui/ofontselector.h index 1d97233..cd134f4 100644 --- a/libopie2/opieui/ofontselector.h +++ b/libopie2/opieui/ofontselector.h @@ -34,13 +34,13 @@ #include <qwidget.h> class QListBox; namespace Opie { namespace Ui { -namespace Private { +namespace Internal { class OFontSelectorPrivate; } /** * This class lets you chose a Font out of a list of Fonts. * It can show a preview too. This selector will use all available @@ -93,13 +93,13 @@ protected: private: void loadFonts ( QListBox * ); void changeFont ( ); private: - Private::OFontSelectorPrivate *d; + Internal::OFontSelectorPrivate *d; }; } } #endif diff --git a/libopie2/opieui/okeyconfigwidget.cpp b/libopie2/opieui/okeyconfigwidget.cpp index ef6d713..eb7acbd 100644 --- a/libopie2/opieui/okeyconfigwidget.cpp +++ b/libopie2/opieui/okeyconfigwidget.cpp @@ -471,18 +471,18 @@ OKeyConfigManager::~OKeyConfigManager() { } /** * Load the Configuration from the OConfig * If a Key is restricted but was in the config we will * make it be the empty key paur - * We will change the group of the OConfig Item! + * We will change the group but restore to the previous. * * @see OKeyPair::emptyKey */ void OKeyConfigManager::load() { - m_conf->setGroup( m_group ); + Opie::Core::OConfigGroupSaver( m_conf, m_group ); /* * Read each item */ int key, mod; for( OKeyConfigItem::List::Iterator it = m_keys.begin(); it != m_keys.end(); ++it ) { @@ -497,16 +497,17 @@ void OKeyConfigManager::load() { } delete m_map; m_map = 0; } /** * We will save the current configuration - * to the OConfig. We will change the group. + * to the OConfig. We will change the group but restore + * to the previous */ void OKeyConfigManager::save() { - m_conf->setGroup( m_group ); + Opie::Core::OConfigGroupSaver( m_conf, m_group ); /* * Write each item */ for( OKeyConfigItem::List::Iterator it = m_keys.begin();it != m_keys.end(); ++it ) { /* skip empty items */ @@ -541,13 +542,13 @@ OKeyConfigItem OKeyConfigManager::handleKeyEvent( QKeyEvent* e ) { * methods * First my Keyboard delivers 256,512,1024 for shift/ctrl/alt instead of the button state * Also key() on virtual inputmethods are zero and only ascii. We need to fix upper and lower * case ascii */ int key, mod; - Opie::Ui::Private::fixupKeys( key, mod, e ); + Opie::Ui::Internal::fixupKeys( key, mod, e ); OKeyConfigItem::List _keyList = keyList( key ); if ( _keyList.isEmpty() ) return OKeyConfigItem(); OKeyConfigItem item; @@ -713,13 +714,13 @@ OKeyConfigItem::List OKeyConfigManager::keyList( int keycode) { return (*m_map)[keycode]; } namespace Opie { namespace Ui { -namespace Private { +namespace Internal { OKeyListViewItem::OKeyListViewItem( const OKeyConfigItem& item, OKeyConfigManager* man, OListViewItem* parent) : Opie::Ui::OListViewItem( parent ), m_manager( man ) { m_origItem = item; setItem( item ); } @@ -935,27 +936,27 @@ OKeyConfigWidget::ChangeMode OKeyConfigWidget::changeMode()const { /** * insert these items before calling load */ void OKeyConfigWidget::insert( const QString& str, OKeyConfigManager* man ) { - Opie::Ui::Private::OKeyConfigWidgetPrivate root( str, man ); + Opie::Ui::Internal::OKeyConfigWidgetPrivate root( str, man ); m_list.append(root); } /** * loads the items and allows editing them */ void OKeyConfigWidget::load() { - Opie::Ui::Private::OKeyConfigWidgetPrivateList::Iterator it; + Opie::Ui::Internal::OKeyConfigWidgetPrivateList::Iterator it; for ( it = m_list.begin(); it != m_list.end(); ++it ) { OListViewItem *item = new OListViewItem( m_view, (*it).name ); OKeyConfigItem::List list = (*it).manager->keyConfigList(); for (OKeyConfigItem::List::Iterator keyIt = list.begin(); keyIt != list.end();++keyIt ) - (void )new Opie::Ui::Private::OKeyListViewItem(*keyIt, (*it).manager, item ); + (void )new Opie::Ui::Internal::OKeyListViewItem(*keyIt, (*it).manager, item ); } } /** * Saves if in Queue Mode. It'll update the supplied @@ -966,13 +967,13 @@ void OKeyConfigWidget::save() { /* * Iterate over all config items */ QListViewItemIterator it( m_view ); while ( it.current() ) { if (it.current()->parent() ) { - Opie::Ui::Private::OKeyListViewItem *item = static_cast<Opie::Ui::Private::OKeyListViewItem*>( it.current() ); + Opie::Ui::Internal::OKeyListViewItem *item = static_cast<Opie::Ui::Internal::OKeyListViewItem*>( it.current() ); OKeyConfigManager *man = item->manager(); man->removeKeyConfig( item->origItem() ); man->addKeyConfig( item->item() ); } ++it; } @@ -990,13 +991,13 @@ void OKeyConfigWidget::slotListViewItem( QListViewItem* _item) { m_none->setChecked( true ); m_btn ->setEnabled( false ); m_def ->setChecked( false ); m_cus ->setChecked( false ); }else{ m_box->setEnabled( true ); - Opie::Ui::Private::OKeyListViewItem *item = static_cast<Opie::Ui::Private::OKeyListViewItem*>( _item ); + Opie::Ui::Internal::OKeyListViewItem *item = static_cast<Opie::Ui::Internal::OKeyListViewItem*>( _item ); OKeyConfigItem keyItem= item->item(); m_lbl->setText( tr("Default: " )+ item->text( 3 ) ); if ( keyItem.keyPair().isEmpty() ) { m_none->setChecked( true ); m_btn ->setEnabled( false ); m_def ->setChecked( false ); @@ -1021,26 +1022,26 @@ void OKeyConfigWidget::slotNoKey() { /* * If immediate we need to remove and readd the key */ - Opie::Ui::Private::OKeyListViewItem *item = static_cast<Opie::Ui::Private::OKeyListViewItem*>(m_view->currentItem()); + Opie::Ui::Internal::OKeyListViewItem *item = static_cast<Opie::Ui::Internal::OKeyListViewItem*>(m_view->currentItem()); updateItem( item, OKeyPair::emptyKey() ); } void OKeyConfigWidget::slotDefaultKey() { m_none->setChecked( false ); m_cus ->setChecked( false ); m_btn ->setEnabled( false ); m_def ->setChecked( true ); if ( !m_view->currentItem() || !m_view->currentItem()->parent() ) return; - Opie::Ui::Private::OKeyListViewItem *item = static_cast<Opie::Ui::Private::OKeyListViewItem*>(m_view->currentItem()); + Opie::Ui::Internal::OKeyListViewItem *item = static_cast<Opie::Ui::Internal::OKeyListViewItem*>(m_view->currentItem()); updateItem( item, item->item().defaultKeyPair() ); } void OKeyConfigWidget::slotCustomKey() { m_cus ->setChecked( true ); m_btn ->setEnabled( true ); @@ -1060,20 +1061,20 @@ void OKeyConfigWidget::slotConfigure() { /* FIXME make use of OModalHelper */ OKeyChooserConfigDialog dlg( this, "Dialog Name", true ); dlg.setCaption(tr("Configure Key")); connect(&dlg, SIGNAL(keyCaptured()), &dlg, SLOT(accept()) ); if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) { - Opie::Ui::Private::OKeyListViewItem *item = static_cast<Opie::Ui::Private::OKeyListViewItem*>(m_view->currentItem()); + Opie::Ui::Internal::OKeyListViewItem *item = static_cast<Opie::Ui::Internal::OKeyListViewItem*>(m_view->currentItem()); updateItem( item, dlg.keyPair() ); } } -bool OKeyConfigWidget::sanityCheck( Opie::Ui::Private::OKeyListViewItem* item, +bool OKeyConfigWidget::sanityCheck( Opie::Ui::Internal::OKeyListViewItem* item, const OKeyPair& newItem ) { OKeyPair::List bList = item->manager()->blackList(); for ( OKeyPair::List::Iterator it = bList.begin(); it != bList.end(); ++it ) { /* black list matched */ if ( *it == newItem ) { QMessageBox::warning( 0, tr("Key is on BlackList" ), @@ -1086,13 +1087,13 @@ bool OKeyConfigWidget::sanityCheck( Opie::Ui::Private::OKeyListViewItem* item, /* no we need to check the other items which is dog slow */ QListViewItemIterator it( item->parent() ); while ( it.current() ) { /* if not our parent and not us */ if (it.current()->parent() && it.current() != item) { /* damn already given away*/ - if ( newItem == static_cast<Opie::Ui::Private::OKeyListViewItem*>(it.current() )->item().keyPair() ) { + if ( newItem == static_cast<Opie::Ui::Internal::OKeyListViewItem*>(it.current() )->item().keyPair() ) { QMessageBox::warning( 0, tr("Key is already assigned" ), tr("<qt>The Key you choose is already taken by " "a different Item of your config. Please try" "using a different key.</qt>" ) ); return false; } @@ -1100,13 +1101,13 @@ bool OKeyConfigWidget::sanityCheck( Opie::Ui::Private::OKeyListViewItem* item, ++it; } return true; } -void OKeyConfigWidget::updateItem( Opie::Ui::Private::OKeyListViewItem *item, +void OKeyConfigWidget::updateItem( Opie::Ui::Internal::OKeyListViewItem *item, const OKeyPair& newItem) { /* sanity check * check against the blacklist of the manager * check if another item uses this key which is o(n) at least */ if ( !newItem.isEmpty() && !sanityCheck(item, newItem )) @@ -1162,13 +1163,13 @@ void OKeyChooserConfigDialog::keyPressEvent( QKeyEvent* ev ) { QDialog::keyPressEvent( ev ); if ( ev->isAutoRepeat() ) return; int mod, key; - Opie::Ui::Private::fixupKeys( key,mod, ev ); + Opie::Ui::Internal::fixupKeys( key,mod, ev ); /* either we used software keyboard * or we've true support */ if ( !m_virtKey && !ev->key()) { m_virtKey = true; @@ -1197,13 +1198,13 @@ void OKeyChooserConfigDialog::keyPressEvent( QKeyEvent* ev ) { if ( ( !mod || m_key || key ) && !m_timer->isActive() ) m_timer->start( 150, true ); m_keyPair = OKeyPair( m_key, m_mod ); } - m_lbl->setText( Opie::Ui::Private::keyToString( m_keyPair ) ); + m_lbl->setText( Opie::Ui::Internal::keyToString( m_keyPair ) ); } void OKeyChooserConfigDialog::keyReleaseEvent( QKeyEvent* ev ) { m_timer->stop(); QDialog::keyPressEvent( ev ); @@ -1233,13 +1234,13 @@ void OKeyChooserConfigDialog::keyReleaseEvent( QKeyEvent* ev ) { } if (mod ) m_mod &= ~mod; else m_key = key; m_keyPair = OKeyPair( m_key, m_mod ); - m_lbl->setText( Opie::Ui::Private::keyToString( m_keyPair ) ); + m_lbl->setText( Opie::Ui::Internal::keyToString( m_keyPair ) ); } } void OKeyChooserConfigDialog::slotTimeUp() { m_mod = m_key = 0; diff --git a/libopie2/opieui/okeyconfigwidget.h b/libopie2/opieui/okeyconfigwidget.h index f75ed99..bb8eb6c 100644 --- a/libopie2/opieui/okeyconfigwidget.h +++ b/libopie2/opieui/okeyconfigwidget.h @@ -22,13 +22,13 @@ class QPushButton; class QListViewItem; class QRadioButton; class QTimer; namespace Opie { namespace Ui { -namespace Private { +namespace Internal { class OKeyConfigWidgetPrivate; typedef QValueList<OKeyConfigWidgetPrivate> OKeyConfigWidgetPrivateList; class OKeyListViewItem; } class OListViewItem; class OListView; @@ -250,19 +250,19 @@ private slots: void slotNoKey(); void slotDefaultKey(); void slotCustomKey(); void slotConfigure(); private: - static bool sanityCheck( Opie::Ui::Private::OKeyListViewItem* man, + static bool sanityCheck( Opie::Ui::Internal::OKeyListViewItem* man, const OKeyPair& newItem ); - void updateItem( Opie::Ui::Private::OKeyListViewItem* man, + void updateItem( Opie::Ui::Internal::OKeyListViewItem* man, const OKeyPair& newItem); void initUi(); Opie::Ui::OListView *m_view; - Opie::Ui::Private::OKeyConfigWidgetPrivateList m_list; + Opie::Ui::Internal::OKeyConfigWidgetPrivateList m_list; QLabel *m_lbl; QPushButton *m_btn; QRadioButton *m_def, *m_cus, *m_none; QWidget* m_box; ChangeMode m_mode; class Private; diff --git a/libopie2/opieui/okeyconfigwidget_p.h b/libopie2/opieui/okeyconfigwidget_p.h index e7eaba6..7690846 100644 --- a/libopie2/opieui/okeyconfigwidget_p.h +++ b/libopie2/opieui/okeyconfigwidget_p.h @@ -3,13 +3,13 @@ */ #include <opie2/olistview.h> namespace Opie { namespace Ui { -namespace Private { +namespace Internal { static QString keyToString( const OKeyPair& ); static void fixupKeys( int&, int&, QKeyEvent* ); class OKeyListViewItem : public Opie::Ui::OListViewItem { public: OKeyListViewItem( const OKeyConfigItem& item, OKeyConfigManager*, Opie::Ui::OListViewItem* parent); ~OKeyListViewItem(); diff --git a/libopie2/opieui/otaskbarapplet.h b/libopie2/opieui/otaskbarapplet.h index 0c85ee7..ec7b9c4 100644 --- a/libopie2/opieui/otaskbarapplet.h +++ b/libopie2/opieui/otaskbarapplet.h @@ -38,13 +38,13 @@ #include <qwidget.h> class QMouseEvent; namespace Opie { namespace Ui { -namespace Private { +namespace Internal { /*====================================================================================== * OTaskbarAppletWrapper *======================================================================================*/ class OTaskbarAppletWrapperPrivate; template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface @@ -119,11 +119,11 @@ private: }; } } #define EXPORT_OPIE_APPLET_v1( AppLet ) \ Q_EXPORT_INTERFACE() { \ - Q_CREATE_INSTANCE( Opie::Ui::Private::OTaskbarAppletWrapper<AppLet> ) \ + Q_CREATE_INSTANCE( Opie::Ui::Internal::OTaskbarAppletWrapper<AppLet> ) \ } #endif |