summaryrefslogtreecommitdiff
path: root/noncore/settings/doctab/doctab.cpp
authormickeyl <mickeyl>2003-11-17 15:16:13 (UTC)
committer mickeyl <mickeyl>2003-11-17 15:16:13 (UTC)
commitc4a6e9c529ea6bcb1c9a42fee33a70300f116c98 (patch) (side-by-side diff)
tree1ee68a2035b0218ba99662db1dff4c4067064cde /noncore/settings/doctab/doctab.cpp
parent725e2723291fe1d71ca68cb59cec83428d40b8af (diff)
downloadopie-c4a6e9c529ea6bcb1c9a42fee33a70300f116c98.zip
opie-c4a6e9c529ea6bcb1c9a42fee33a70300f116c98.tar.gz
opie-c4a6e9c529ea6bcb1c9a42fee33a70300f116c98.tar.bz2
This patch makes the famous Documents Tab customizably optional.
Note that the document tab is so tight coupled to the rest of the launcher that it proved impossible for me to remove the tab as is. However I could make all the scanning and the displaying optional. The customization can be done via the launcher settings applications - a new doc tab category has been added. Further customization can be added to that tab. I also added a doc tab settings application for use with the "first usage wizard"
Diffstat (limited to 'noncore/settings/doctab/doctab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/doctab/doctab.cpp94
1 files changed, 94 insertions, 0 deletions
diff --git a/noncore/settings/doctab/doctab.cpp b/noncore/settings/doctab/doctab.cpp
new file mode 100644
index 0000000..feaf538
--- a/dev/null
+++ b/noncore/settings/doctab/doctab.cpp
@@ -0,0 +1,94 @@
+/**********************************************************************
+** 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 "doctab.h"
+
+#include <qpe/global.h>
+#include <qpe/fontmanager.h>
+#include <qpe/config.h>
+#include <qpe/applnk.h>
+#include <qpe/qpedialog.h>
+#include <qpe/qpeapplication.h>
+#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#include <qpe/qcopenvelope_qws.h>
+#endif
+
+#include <qlabel.h>
+#include <qcheckbox.h>
+#include <qradiobutton.h>
+#include <qtabwidget.h>
+#include <qslider.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qdatastream.h>
+#include <qmessagebox.h>
+#include <qcombobox.h>
+#include <qspinbox.h>
+#include <qlistbox.h>
+#include <qdir.h>
+#if QT_VERSION >= 300
+#include <qstylefactory.h>
+#endif
+
+#include <stdlib.h>
+
+
+DocTabSettings::DocTabSettings( QWidget* parent, const char* name, WFlags fl )
+ : DocTabSettingsBase( parent, name, TRUE, fl )
+{
+ dl = new QPEDialogListener(this);
+ reset();
+}
+
+DocTabSettings::~DocTabSettings()
+{}
+
+void DocTabSettings::accept()
+{
+ applyDocTab();
+ QDialog::accept();
+}
+
+void DocTabSettings::applyDocTab()
+{
+ Config cfg( "Launcher" );
+ cfg.setGroup( "DocTab" );
+ cfg.writeEntry( "Enable", yes->isChecked() );
+ cfg.write();
+}
+
+
+void DocTabSettings::reject()
+{
+ reset();
+ QDialog::reject();
+}
+
+void DocTabSettings::reset()
+{
+}
+
+QString DocTabSettings::actualDocTab;
+
+void DocTabSettings::done(int r)
+{
+ QDialog::done(r);
+ close();
+}