author | drw <drw> | 2005-06-05 22:47:00 (UTC) |
---|---|---|
committer | drw <drw> | 2005-06-05 22:47:00 (UTC) |
commit | 8ee47cc828388f6f3b44356dbcee5536a9e83e55 (patch) (side-by-side diff) | |
tree | cf4c704b08b9ba277e22d0f42cbe45a2b1057a79 | |
parent | 56b8917e2cca3715e9a19941965ddd73e6bba5d4 (diff) | |
download | opie-8ee47cc828388f6f3b44356dbcee5536a9e83e55.zip opie-8ee47cc828388f6f3b44356dbcee5536a9e83e55.tar.gz opie-8ee47cc828388f6f3b44356dbcee5536a9e83e55.tar.bz2 |
Fix doc box headers
-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/appearance.h | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/colorlistitem.h | 49 | ||||
-rw-r--r-- | noncore/settings/appearance2/decolistitem.h | 49 | ||||
-rw-r--r-- | noncore/settings/appearance2/editScheme.cpp | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/editScheme.h | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/exceptlistitem.h | 49 | ||||
-rw-r--r-- | noncore/settings/appearance2/main.cpp | 49 | ||||
-rw-r--r-- | noncore/settings/appearance2/sample.cpp | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/sample.h | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/stylelistitem.h | 49 |
11 files changed, 292 insertions, 259 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index 1aa91bb..93e28fa 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp @@ -1,91 +1,94 @@ /* - This file is part of the OPIE Project + Â Â Â Â Â Â Â Â This file is part of the Opie Project + Copyright (c) 2002 Trolltech AS <info@trolltech.com> - =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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, + Copyright (c) 2002 Dan Williams <drw@handhelds.org> + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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 "appearance.h" #include "editScheme.h" #include "stylelistitem.h" #include "decolistitem.h" #include "colorlistitem.h" #include "exceptlistitem.h" #include "sample.h" /* OPIE */ #include <opie2/odevice.h> #include <opie2/ofiledialog.h> #include <opie2/otabwidget.h> #include <opie2/odebug.h> #include <qpe/config.h> #include <qpe/global.h> #include <qpe/qpeapplication.h> #include <qpe/qpemessagebox.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpestyle.h> #include <qpe/lightstyle.h> #include <qpe/styleinterface.h> /* QT */ #include <qbuttongroup.h> #include <qcheckbox.h> #include <qcombobox.h> #include <qdialog.h> #include <qdir.h> #include <qlabel.h> #include <qlayout.h> #include <qlineedit.h> #include <qlistbox.h> #include <qmessagebox.h> #include <qpushbutton.h> #include <qradiobutton.h> #if QT_VERSION >= 0x030000 #include <qstylefactory.h> #endif #include <qtoolbutton.h> #include <qwindowsstyle.h> #include <qlistview.h> #include <qheader.h> #include <qvbox.h> #include <qwhatsthis.h> using namespace Opie; using namespace Opie::Ui; using namespace Opie::Core; class DefaultWindowDecoration : public WindowDecorationInterface { public: DefaultWindowDecoration() : ref(0) {} QString name() const { return "Default"; } QPixmap icon() const { return QPixmap(); } diff --git a/noncore/settings/appearance2/appearance.h b/noncore/settings/appearance2/appearance.h index 287f9f7..ef7e874 100644 --- a/noncore/settings/appearance2/appearance.h +++ b/noncore/settings/appearance2/appearance.h @@ -1,90 +1,93 @@ /* - This file is part of the OPIE Project - =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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, + Â Â Â Â Â Â Â Â This file is part of the Opie Project + + Copyright (c) 2002 Dan Williams <drw@handhelds.org> + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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. - */ #ifndef APPEARANCESETTINGS_H #define APPEARANCESETTINGS_H #include <opie2/ofontselector.h> #include <qpe/fontdatabase.h> #include <qdialog.h> using Opie::Ui::OFontSelector; class QCheckBox; class QComboBox; class QLabel; class QLineEdit; class QListBox; class QMultiLineEdit; class QPushButton; class QRadioButton; class QToolButton; class SampleWindow; namespace Opie {namespace Ui {class OFontSelector;}} class QListView; class QListViewItem; class Config; class Appearance : public QDialog { Q_OBJECT public: Appearance( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~Appearance(); static QString appName() { return QString::fromLatin1("appearance"); } protected: virtual void accept ( ); virtual void done ( int r ); protected slots: void styleClicked ( int ); void styleSettingsClicked ( ); void decoClicked ( int ); void fontClicked ( const QFont & ); void colorClicked ( int ); void editSchemeClicked(); void saveSchemeClicked(); void deleteSchemeClicked(); void tabChanged ( QWidget * ); private: void changeText(); QWidget *createStyleTab ( QWidget *parent, Config &cfg ); QWidget *createDecoTab ( QWidget *parent, Config &cfg ); QWidget *createFontTab ( QWidget *parent, Config &cfg ); QWidget *createColorTab ( QWidget *parent, Config &cfg ); QWidget *createAdvancedTab ( QWidget *parent, Config &cfg ); private: diff --git a/noncore/settings/appearance2/colorlistitem.h b/noncore/settings/appearance2/colorlistitem.h index f8d5c45..7f6014c 100644 --- a/noncore/settings/appearance2/colorlistitem.h +++ b/noncore/settings/appearance2/colorlistitem.h @@ -1,89 +1,92 @@ /* - =. This file is part of the OPIE Project - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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. + Â Â Â Â Â Â Â Â This file is part of the Opie Project + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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. */ #ifndef COLORLISTITEM_H #define COLORLISTITEM_H #include <qlistbox.h> #include <qpalette.h> #include <qapplication.h> #include <qpe/config.h> class Appearance; class ColorListItem : public QListBoxText { public: ColorListItem ( const QString &t, Config &cfg ) : QListBoxText ( t ) { m_colors = new QColor [s_colorcount]; load ( cfg ); } virtual ~ColorListItem ( ) { delete [] m_colors; } QPalette palette ( ) { return m_palette; } bool load ( Config &cfg ) { for ( int i = 0; i < s_colorcount; i++ ) m_colors [i] = QColor ( cfg. readEntry ( s_colorlut [i]. m_key, s_colorlut [i]. m_def )); buildPalette ( ); return true; } void buildPalette ( ) { m_palette = QPalette ( m_colors [r2i(QColorGroup::Button)], m_colors [r2i(QColorGroup::Background)] ); m_palette. setColor ( QColorGroup::Highlight, m_colors [r2i(QColorGroup::Highlight)] ); m_palette. setColor ( QColorGroup::HighlightedText, m_colors [r2i(QColorGroup::HighlightedText)] ); m_palette. setColor ( QColorGroup::Text, m_colors [r2i(QColorGroup::Text)] ); m_palette. setColor ( QPalette::Active, QColorGroup::ButtonText, m_colors [r2i(QColorGroup::ButtonText)] ); m_palette. setColor ( QColorGroup::Base, m_colors [r2i(QColorGroup::Base)] ); m_palette. setColor ( QPalette::Disabled, QColorGroup::Text, m_palette. color ( QPalette::Active, QColorGroup::Background ). dark ( )); } bool save ( Config &cfg ) { for ( int i = 0; i < s_colorcount; i++ ) cfg. writeEntry ( s_colorlut [i]. m_key, m_colors [i]. name ( )); return true; } QColor color ( QColorGroup::ColorRole role ) { int i = r2i ( role ); return i >= 0 ? m_colors [i] : QColor ( ); } diff --git a/noncore/settings/appearance2/decolistitem.h b/noncore/settings/appearance2/decolistitem.h index da7924c..8dce455 100644 --- a/noncore/settings/appearance2/decolistitem.h +++ b/noncore/settings/appearance2/decolistitem.h @@ -1,89 +1,92 @@ /* - =. This file is part of the OPIE Project - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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. + Â Â Â Â Â Â Â Â This file is part of the Opie Project + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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. */ #ifndef DECOLISTITEM_H #define DECOLISTITEM_H #include <qpe/windowdecorationinterface.h> #include <qlistbox.h> class DecoListItem : public QListBoxPixmap { public: DecoListItem ( const QString &t ) : QListBoxPixmap ( QPixmap ( ), t ) { m_lib = 0; m_window_if = 0; // m_settings_if = 0; } DecoListItem ( QLibrary *lib, WindowDecorationInterface *iface ) : QListBoxPixmap ( iface-> icon ( ), iface-> name ( )) { m_lib = lib; m_window_if = iface; // iface-> queryInterface ( IID_WindowDecoration, (QUnknownInterface **) &m_settings_if ); } virtual ~DecoListItem ( ) { // if ( m_settings_if ) // m_settings_if-> release ( ); if ( m_window_if ) m_window_if-> release ( ); delete m_lib; } bool hasSettings ( ) const { // return ( m_settings_if ); return false; } QWidget *settings ( QWidget * /*parent*/ ) { // return m_settings_if ? m_settings_if-> create ( parent ) : 0; return 0; } bool setSettings ( bool /*accepted*/ ) { // if ( !m_settings_if ) // return false; // if ( accepted ) // return m_settings_if-> accept ( ); // else { // m_settings_if-> reject ( ); // return false; // } return false; } QString key ( ) { if ( m_lib ) return QFileInfo ( m_lib-> library ( )). fileName ( ); diff --git a/noncore/settings/appearance2/editScheme.cpp b/noncore/settings/appearance2/editScheme.cpp index 18c69a5..2645833 100644 --- a/noncore/settings/appearance2/editScheme.cpp +++ b/noncore/settings/appearance2/editScheme.cpp @@ -1,74 +1,77 @@ /* - This file is part of the OPIE Project - =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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. + Â Â Â Â Â Â Â Â This file is part of the Opie Project + Copyright (c) 2002 Dan Williams <drw@handhelds.org> + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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 "editScheme.h" #include <qaction.h> #include <qlabel.h> #include <qlayout.h> #include <qpopupmenu.h> #include <qscrollview.h> #include <qtoolbutton.h> #include <qwhatsthis.h> using namespace Opie::Ui; EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent, const char* name, bool modal, WFlags ) : QDialog ( parent, name, modal, WStyle_ContextHelp ) { setCaption ( tr( "Edit scheme" ) ); QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 ); m_count = cnt; m_buttons = new Opie::OColorButton * [cnt]; m_colors = colors; for ( int i = 0; i < cnt; i++ ) { QLabel *l = new QLabel ( labels [i], this ); layout-> addWidget ( l, i, 0 ); QWhatsThis::add( l, tr( "Click here to select a color for: " ).arg( labels [i] ) ); m_buttons [i] = new Opie::OColorButton ( this, colors [i] ); layout-> addWidget ( m_buttons [i], i, 1 ); QWhatsThis::add( m_buttons [i], tr( "Click here to select a color for: " ).arg( labels [i] ) ); } } EditScheme::~EditScheme ( ) { delete [] m_buttons; } void EditScheme::accept ( ) { for ( int i = 0; i < m_count; i++ ) m_colors [i] = m_buttons [i]-> color ( ); QDialog::accept ( ); } diff --git a/noncore/settings/appearance2/editScheme.h b/noncore/settings/appearance2/editScheme.h index 302652c..55897c4 100644 --- a/noncore/settings/appearance2/editScheme.h +++ b/noncore/settings/appearance2/editScheme.h @@ -1,55 +1,58 @@ /* - This file is part of the OPIE Project - =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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, + Â Â Â Â Â Â Â Â This file is part of the Opie Project + + Copyright (c) 2002 Dan Williams <drw@handhelds.org> + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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. - */ #ifndef EDITSCHEME_H #define EDITSCHEME_H #include <opie2/ocolorbutton.h> #include <qdialog.h> class QColor; namespace Opie {namespace Ui {class OColor;}} class EditScheme : public QDialog { Q_OBJECT public: EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); virtual ~EditScheme ( ); protected slots: virtual void accept ( ); private: int m_count; QColor *m_colors; Opie::OColorButton **m_buttons; }; #endif diff --git a/noncore/settings/appearance2/exceptlistitem.h b/noncore/settings/appearance2/exceptlistitem.h index 7b4fa48..365fa90 100644 --- a/noncore/settings/appearance2/exceptlistitem.h +++ b/noncore/settings/appearance2/exceptlistitem.h @@ -1,89 +1,92 @@ /* - =. This file is part of the OPIE Project - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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, + Â Â Â Â Â Â Â Â This file is part of the Opie Project + + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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. - */ #ifndef EXCEPTLISTITEM_H #define EXCEPTLISTITEM_H #include <qlistview.h> #include <qpixmap.h> #include <qimage.h> #include <qpainter.h> class ExceptListItem : public QListViewItem { public: ExceptListItem ( QListView *lv, QListViewItem *after, const QString &t, bool nostyle = true, bool nofont = true, bool nodeco = true ) : QListViewItem ( lv, after ) { m_text = t; m_nofont = nofont; m_nostyle = nostyle; m_nodeco = nodeco; init ( ); } virtual ~ExceptListItem ( ) { } static void overlay ( QImage &img, const QImage &ovl ) { if (( img. size ( ) != ovl. size ( )) || ( img. depth ( ) != ovl. depth ( ))) return; for ( int y = 0; y != img. height ( ); y++ ) { QRgb *iline = (QRgb *) img. scanLine ( y ); QRgb *oline = (QRgb *) ovl. scanLine ( y ); for ( int x = 0; x != img. width ( ); x++ ) { QRgb i = *iline; QRgb o = *oline; *iline = qRgba (( qRed ( i ) + qRed ( o )) / 2, ( qGreen ( i ) + qGreen ( o )) / 2, ( qBlue ( i ) + qBlue ( o )) / 2, ( qAlpha ( i ) + qAlpha ( o )) / 2 ); iline++; oline++; } } } static void init ( ) { static bool init = false; if ( init ) return; QImage noimg = Resource::loadImage ( "appearance/no.png" ); QImage fontimg = Resource::loadImage ( "appearance/font.png" ); QImage styleimg = Resource::loadImage ( "appearance/style.png" ); QImage decoimg = Resource::loadImage ( "appearance/deco.png" ); s_fontpix [0] = new QPixmap ( ); diff --git a/noncore/settings/appearance2/main.cpp b/noncore/settings/appearance2/main.cpp index 87061e3..5c0f302 100644 --- a/noncore/settings/appearance2/main.cpp +++ b/noncore/settings/appearance2/main.cpp @@ -1,34 +1,37 @@ /* - =. This file is part of the OPIE Project - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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. + Â Â Â Â Â Â Â Â This file is part of the Opie Project + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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 "appearance.h" #include <opie2/oapplicationfactory.h> using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<Appearance> ) diff --git a/noncore/settings/appearance2/sample.cpp b/noncore/settings/appearance2/sample.cpp index f6c4dca..557a23e 100644 --- a/noncore/settings/appearance2/sample.cpp +++ b/noncore/settings/appearance2/sample.cpp @@ -1,90 +1,93 @@ /* - This file is part of the OPIE Project - =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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, + Â Â Â Â Â Â Â Â This file is part of the Opie Project + + Copyright (c) 2002 Trolltech AS <info@trolltech.com> + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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 <qvbox.h> #include <qpopupmenu.h> #include <qpainter.h> #include <qmenubar.h> #include <qcheckbox.h> #include <qpushbutton.h> #include <qscrollbar.h> #include <qlayout.h> #include <qwhatsthis.h> #include <qpixmapcache.h> #include <qtimer.h> #include <qobjectlist.h> #include <qcommonstyle.h> #include "sample.h" class SampleText : public QWidget { public: SampleText( const QString &t, bool h, QWidget *parent ) : QWidget( parent ), hl(h), text(t) { if ( hl ) setBackgroundMode( PaletteHighlight ); else setBackgroundMode( PaletteBase ); } QSize sizeHint() const { QFontMetrics fm(font()); return QSize( fm.width(text)+10, fm.height()+4 ); } void paintEvent( QPaintEvent * ) { QPainter p(this); if ( hl ) p.setPen( colorGroup().highlightedText() ); else p.setPen( colorGroup().text() ); p.drawText( rect(), AlignCenter, text ); } private: bool hl; QString text; }; SampleWindow::SampleWindow( QWidget *parent ) : QWidget(parent), iface(0) { init(); } QSize SampleWindow::sizeHint() const { return container->sizeHint() + QSize( 10, 35 ); } void SampleWindow::setFont( const QFont &f ) diff --git a/noncore/settings/appearance2/sample.h b/noncore/settings/appearance2/sample.h index 27e6db5..ba18038 100644 --- a/noncore/settings/appearance2/sample.h +++ b/noncore/settings/appearance2/sample.h @@ -1,77 +1,80 @@ /* - This file is part of the OPIE Project - =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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. + Â Â Â Â Â Â Â Â This file is part of the Opie Project + Copyright (c) 2002 Trolltech AS <info@trolltech.com> + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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. */ #ifndef __PREVIEW_H__ #define __PREVIEW_H__ #include <qwidget.h> #include <qpe/windowdecorationinterface.h> class QVBox; class QPopupMenu; class SampleText; class SampleWindow : public QWidget { Q_OBJECT public: SampleWindow( QWidget *parent ); QSize sizeHint() const; virtual void setFont( const QFont &f ); void setStyle2 ( QStyle *sty, const QPalette &p ); void setDecoration( WindowDecorationInterface *i ); void setPalette ( const QPalette & ); virtual void paintEvent( QPaintEvent * ); void init(); virtual bool eventFilter( QObject *, QEvent *e ); virtual void paletteChange( const QPalette &old ); virtual void resizeEvent( QResizeEvent *re ); public slots: void fixGeometry(); protected: WindowDecorationInterface *iface; WindowDecorationInterface::WindowData wd; QVBox *container; QPopupMenu *popup; int th; int tb; int lb; int rb; int bb; }; #endif diff --git a/noncore/settings/appearance2/stylelistitem.h b/noncore/settings/appearance2/stylelistitem.h index b6c72c3..613fa71 100644 --- a/noncore/settings/appearance2/stylelistitem.h +++ b/noncore/settings/appearance2/stylelistitem.h @@ -1,89 +1,92 @@ /* - =. This file is part of the OPIE Project - .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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 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. + Â Â Â Â Â Â Â Â This file is part of the Opie Project + Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> + =. + .=l. +Â Â Â Â Â Â .>+-= +Â _;:, Â Â .> Â Â :=|. This program is free software; you can +.> <`_, Â > Â . Â <= 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. */ #ifndef STYLELISTITEM_H #define STYLELISTITEM_H /* OPIE */ #include <qpe/styleinterface.h> #include <qpe/qlibrary.h> #include <qpe/resource.h> /* QT */ #include <qlistbox.h> #include <qfileinfo.h> #include <stdio.h> class StyleListItem : public QListBoxText { public: StyleListItem ( const QString &t, QStyle *sty ) : QListBoxText ( t ) { m_lib = 0; m_style_if = 0; m_settings_if = 0; m_style = sty; } StyleListItem ( QLibrary *lib, StyleInterface *iface ) : QListBoxText ( iface-> name ( )) { m_lib = lib; m_style_if = iface; m_settings_if = 0; m_style = iface-> style ( ); iface-> queryInterface ( IID_StyleExtended, (QUnknownInterface **) &m_settings_if ); } virtual ~StyleListItem ( ) { delete m_style; if ( m_settings_if ) m_settings_if-> release ( ); if ( m_style_if ) m_style_if-> release ( ); delete m_lib; } bool hasSettings ( ) const { return m_settings_if ? m_settings_if-> hasSettings ( ) : false; } QWidget *settings ( QWidget *parent ) { return m_settings_if ? m_settings_if-> create ( parent ) : 0; } bool setSettings ( bool accepted ) { if ( !m_settings_if ) return false; if ( accepted ) return m_settings_if-> accept ( ); |