summaryrefslogtreecommitdiff
authordrw <drw>2004-02-21 22:55:22 (UTC)
committer drw <drw>2004-02-21 22:55:22 (UTC)
commitc2a2f38b9b7af1f9a4d885c2527a4501425fb9a2 (patch) (side-by-side diff)
tree7b8b464a300481cd76ca8610c8443c66cc5ecf95
parentf36efd3490299fb9402a2dc2a6bd2a029fcd93cb (diff)
downloadopie-c2a2f38b9b7af1f9a4d885c2527a4501425fb9a2.zip
opie-c2a2f38b9b7af1f9a4d885c2527a4501425fb9a2.tar.gz
opie-c2a2f38b9b7af1f9a4d885c2527a4501425fb9a2.tar.bz2
Appearance: libopie->libopie2/libqtaux
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp7
-rw-r--r--noncore/settings/appearance2/appearance.h38
-rw-r--r--noncore/settings/appearance2/appearance2.pro6
-rw-r--r--noncore/settings/appearance2/editScheme.cpp22
-rw-r--r--noncore/settings/appearance2/editScheme.h20
5 files changed, 48 insertions, 45 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp
index ba12e55..b39203b 100644
--- a/noncore/settings/appearance2/appearance.cpp
+++ b/noncore/settings/appearance2/appearance.cpp
@@ -1,90 +1,89 @@
/*
                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,
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 <opie/ofontselector.h>
-#include <opie/odevice.h>
-#include <opie/ofiledialog.h>
-#include <opie/otabwidget.h>
+#include <opie2/odevice.h>
+#include <opie2/ofiledialog.h>
+#include <opie2/otabwidget.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 >= 300
#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;
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 51e9636..f45f549 100644
--- a/noncore/settings/appearance2/appearance.h
+++ b/noncore/settings/appearance2/appearance.h
@@ -1,128 +1,132 @@
/*
                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.
*/
#ifndef APPEARANCESETTINGS_H
#define APPEARANCESETTINGS_H
+#include <opie2/ofontselector.h>
+
#include <qpe/fontdatabase.h>
#include <qdialog.h>
+using Opie::OFontSelector;
+
class QCheckBox;
class QComboBox;
class QLabel;
class QLineEdit;
class QListBox;
class QMultiLineEdit;
class QPushButton;
class QRadioButton;
class QToolButton;
class SampleWindow;
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 );
-
+ 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 * );
-
+
void addExcept ( );
void delExcept ( );
void upExcept ( );
void downExcept ( );
void clickedExcept ( QListViewItem *, const QPoint &, int );
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 );
+
+ 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:
bool m_style_changed;
bool m_font_changed;
bool m_scheme_changed;
bool m_deco_changed;
bool m_color_changed;
int m_original_style;
int m_original_deco;
int m_original_tabstyle;
bool m_original_tabpos;
-
+
QListBox * m_style_list;
QPushButton * m_style_settings;
QListBox * m_deco_list;
QListBox * m_color_list;
- OFontSelector *m_fontselect;
+ OFontSelector *m_fontselect;
+
+ SampleWindow *m_sample;
- SampleWindow *m_sample;
-
QComboBox * m_tabstyle_list;
QRadioButton *m_tabstyle_top;
QRadioButton *m_tabstyle_bottom;
QRadioButton *m_rotdir_cw;
QRadioButton *m_rotdir_ccw;
QRadioButton *m_rotdir_flip;
- QWidget * m_advtab;
+ QWidget * m_advtab;
QListView * m_except;
QCheckBox * m_force;
};
#endif
diff --git a/noncore/settings/appearance2/appearance2.pro b/noncore/settings/appearance2/appearance2.pro
index ca5a4ec..e2d73c2 100644
--- a/noncore/settings/appearance2/appearance2.pro
+++ b/noncore/settings/appearance2/appearance2.pro
@@ -1,12 +1,10 @@
CONFIG = qt warn_on release quick-app
HEADERS = appearance.h editScheme.h sample.h
SOURCES = appearance.cpp editScheme.cpp main.cpp sample.cpp
INCLUDEPATH += $(OPIEDIR)/include
-DEPENDPATH += ../$(OPIEDIR)/include
-LIBS += -lqpe -lopie
-INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
+LIBS += -lqpe -lopiecore2 -lopieui2 -lqtaux2
-TARGET = appearance
+TARGET = appearance
include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/settings/appearance2/editScheme.cpp b/noncore/settings/appearance2/editScheme.cpp
index 7e5225f..0f3702f 100644
--- a/noncore/settings/appearance2/editScheme.cpp
+++ b/noncore/settings/appearance2/editScheme.cpp
@@ -1,75 +1,73 @@
/*
                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.
*/
#include "editScheme.h"
-#include <opie/ocolorbutton.h>
-
#include <qaction.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpopupmenu.h>
#include <qscrollview.h>
#include <qtoolbutton.h>
#include <qwhatsthis.h>
EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent, const char* name, bool modal, WFlags )
- : QDialog ( parent, name, modal, WStyle_ContextHelp )
+ : QDialog ( parent, name, modal, WStyle_ContextHelp )
{
- setCaption ( tr( "Edit scheme" ) );
- QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 );
+ setCaption ( tr( "Edit scheme" ) );
+ QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 );
m_count = cnt;
m_buttons = new 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] ) );
+ QWhatsThis::add( l, tr( "Click here to select a color for: " ).arg( labels [i] ) );
m_buttons [i] = new 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] ) );
+ QWhatsThis::add( m_buttons [i], tr( "Click here to select a color for: " ).arg( labels [i] ) );
}
}
EditScheme::~EditScheme ( )
{
- delete [] m_buttons;
+ delete [] m_buttons;
}
void EditScheme::accept ( )
{
- for ( int i = 0; i < m_count; i++ )
- m_colors [i] = m_buttons [i]-> color ( );
-
- QDialog::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 93dc50d..c7539cb 100644
--- a/noncore/settings/appearance2/editScheme.h
+++ b/noncore/settings/appearance2/editScheme.h
@@ -1,53 +1,57 @@
/*
                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.
*/
#ifndef EDITSCHEME_H
#define EDITSCHEME_H
+#include <opie2/ocolorbutton.h>
+
#include <qdialog.h>
+using Opie::OColorButton;
+
class QColor;
class OColorButton;
class EditScheme : public QDialog {
- Q_OBJECT
+ 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 ( );
+ 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 ( );
+ virtual void accept ( );
private:
- int m_count;
- QColor *m_colors;
- OColorButton **m_buttons;
+ int m_count;
+ QColor *m_colors;
+ OColorButton **m_buttons;
};
#endif