summaryrefslogtreecommitdiff
path: root/noncore/styles/theme/settings
Side-by-side diff
Diffstat (limited to 'noncore/styles/theme/settings') (more/less context) (show whitespace changes)
-rw-r--r--noncore/styles/theme/settings/main.cpp34
-rw-r--r--noncore/styles/theme/settings/settings.pro24
-rw-r--r--noncore/styles/theme/settings/themeset.cpp124
-rw-r--r--noncore/styles/theme/settings/themeset.h20
4 files changed, 0 insertions, 202 deletions
diff --git a/noncore/styles/theme/settings/main.cpp b/noncore/styles/theme/settings/main.cpp
deleted file mode 100644
index 94d40f3..0000000
--- a/noncore/styles/theme/settings/main.cpp
+++ b/dev/null
@@ -1,34 +0,0 @@
-/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
-**
-** This file is part of Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "themeset.h"
-
-#include <qpe/qpeapplication.h>
-
-
-int main ( int argc, char** argv )
-{
- QPEApplication a ( argc, argv );
-
- ThemeSet dlg;
- a. showMainWidget ( &dlg );
-
- return a. exec ( );
-}
diff --git a/noncore/styles/theme/settings/settings.pro b/noncore/styles/theme/settings/settings.pro
deleted file mode 100644
index 85d1f7a..0000000
--- a/noncore/styles/theme/settings/settings.pro
+++ b/dev/null
@@ -1,24 +0,0 @@
-TEMPLATE = app
-CONFIG += qt warn_on release
-DESTDIR = $(OPIEDIR)/bin
-HEADERS = themeset.h
-SOURCES = themeset.cpp main.cpp
-INCLUDEPATH += $(OPIEDIR)/include
-DEPENDPATH += ../$(OPIEDIR)/include
-LIBS += -lqpe
-TARGET = theme-settings
-
-TRANSLATIONS = ../../../../i18n/de/theme-settings.ts \
- ../../../../i18n/en/theme-settings.ts \
- ../../../../i18n/es/theme-settings.ts \
- ../../../../i18n/fr/theme-settings.ts \
- ../../../../i18n/hu/theme-settings.ts \
- ../../../../i18n/ja/theme-settings.ts \
- ../../../../i18n/ko/theme-settings.ts \
- ../../../../i18n/no/theme-settings.ts \
- ../../../../i18n/pl/theme-settings.ts \
- ../../../../i18n/pt/theme-settings.ts \
- ../../../../i18n/pt_BR/theme-settings.ts \
- ../../../../i18n/sl/theme-settings.ts \
- ../../../../i18n/zh_CN/theme-settings.ts \
- ../../../../i18n/zh_TW/theme-settings.ts
diff --git a/noncore/styles/theme/settings/themeset.cpp b/noncore/styles/theme/settings/themeset.cpp
deleted file mode 100644
index 046618e..0000000
--- a/noncore/styles/theme/settings/themeset.cpp
+++ b/dev/null
@@ -1,124 +0,0 @@
-/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
-**
-** This file is part of Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-
-
-#include "themeset.h"
-
-#include <qpe/qpeapplication.h>
-#include <qpe/global.h>
-
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qdir.h>
-
-#include <qpe/config.h>
-
-
-class MyConfig : public Config
-{
-public:
- MyConfig ( const QString &f, Domain d ) : Config ( f, d )
- { }
-
- bool hasGroup ( const QString &gname ) const
- {
- QMap< QString, ConfigGroup>::ConstIterator it = groups. find ( gname );
- return ( it != groups.end() );
- }
-};
-
-class MyItem : public QListViewItem
-{
-public:
- MyItem ( QListView *lv, const QString &name, const QString &comm, const QString &theme ) : QListViewItem ( lv, name, comm )
- {
- m_theme = theme;
- }
-
-
- QString m_theme;
-};
-
-
-ThemeSet::ThemeSet ( QWidget* parent, const char *name, WFlags fl )
- : QDialog ( parent, name, fl )
-{
- setCaption ( tr( "Theme Style" ) );
-
- Config config ( "qpe" );
- config. setGroup ( "Appearance" );
-
- QString active = config. readEntry ( "Theme", "default" );
-
- QVBoxLayout *vbox = new QVBoxLayout ( this );
- vbox-> setSpacing ( 3 );
- vbox-> setMargin ( 6 );
-
- vbox-> addWidget ( new QLabel ( tr( "Select the theme to be used" ), this ));
-
- m_list = new QListView ( this );
- m_list-> addColumn ( tr( "Name" ));
- m_list-> addColumn ( tr( "Description" ));
- m_list-> setSelectionMode ( QListView::Single );
- m_list-> setAllColumnsShowFocus ( true );
- vbox-> addWidget ( m_list, 10 );
-
- QListViewItem *item = new MyItem ( m_list, tr( "[No theme]" ), "", "" );
- m_list-> setSelected ( item, true );
-
- QString path = QPEApplication::qpeDir() + "/plugins/styles/themes";
- QStringList list = QDir ( path, "*.themerc" ). entryList ( );
-
- for ( QStringList::Iterator it = list. begin(); it != list. end ( ); ++it ) {
- MyConfig cfg ( path + "/" + *it, Config::File );
-
- if ( cfg. hasGroup ( "Misc" )) {
- cfg. setGroup ( "Misc" );
-
- QString name = cfg. readEntry ( "Name" );
- QString comm = cfg. readEntry ( "Comment" );
-
- if ( !name. isEmpty ( )) {
- QString fname = (*it). left ((*it). length ( ) - 8 );
-
- item = new MyItem ( m_list, name, comm, fname );
- if ( active == fname ) {
- m_list-> setSelected ( item, true );
- }
- }
- }
- }
-}
-
-void ThemeSet::accept ( )
-{
- Config config ( "qpe" );
- config. setGroup ( "Appearance" );
-
- MyItem *it = (MyItem *) m_list-> selectedItem ( );
- config. writeEntry ( "Theme", it ? it-> m_theme : QString ( "" ));
-
- Global::applyStyle ( );
-
- QDialog::accept ( );
-}
-
diff --git a/noncore/styles/theme/settings/themeset.h b/noncore/styles/theme/settings/themeset.h
deleted file mode 100644
index 24804ce..0000000
--- a/noncore/styles/theme/settings/themeset.h
+++ b/dev/null
@@ -1,20 +0,0 @@
-#ifndef __OPIE_THEME_SET_H__
-#define __OPIE_THEME_SET_H__
-
-#include <qdialog.h>
-
-class QListView;
-
-class ThemeSet : public QDialog {
- Q_OBJECT
-
-public:
- ThemeSet ( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 );
-
-protected:
- virtual void accept ( );
-
-private:
- QListView *m_list;
-};
-#endif