author | zautrix <zautrix> | 2004-08-06 10:53:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-06 10:53:41 (UTC) |
commit | cde989298c4891f54ad70ae03080ac8fa57b5c3f (patch) (side-by-side diff) | |
tree | 945e4d75d5c6f2a6a2ebed6e50a6a1a769e4366c | |
parent | 841ce8881dbeee8a10dea8b96f82addd28f52536 (diff) | |
download | kdepimpi-cde989298c4891f54ad70ae03080ac8fa57b5c3f.zip kdepimpi-cde989298c4891f54ad70ae03080ac8fa57b5c3f.tar.gz kdepimpi-cde989298c4891f54ad70ae03080ac8fa57b5c3f.tar.bz2 |
Added licence menu in kopi
-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 10 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 44 | ||||
-rw-r--r-- | microkde/kapplication.h | 1 |
5 files changed, 60 insertions, 18 deletions
@@ -28,3 +28,3 @@ SUBDIRS_MICROKDE = \ SUBDIRS_QTOPIA_PLUGIN = \ - kabc/plugins/qtopia + kabc/plugins/qtopia @@ -34,3 +34,3 @@ SUBDIRS_OPIE_PLUGIN = \ SUBDIRS_SHARP_PLUGIN = \ - kabc/plugins/sharpdtm + kabc/plugins/sharpdtm @@ -144,6 +144,6 @@ variable_test: variable_info else - ifndef SHARPDTMSDK + ifndef SHARPDTMSDK @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) $(error SHARPDTMSDK is not defined) - endif + endif endif @@ -199,5 +199,2 @@ tmake: objects \ kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ - kaddressbook/xxport/opie/Makefile$(PLATFORM) \ - kaddressbook/xxport/qtopia/Makefile$(PLATFORM) \ - kaddressbook/xxport/sharpdtm/Makefile$(PLATFORM) \ kaddressbook/Makefile$(PLATFORM) \ @@ -206,2 +203,3 @@ tmake: objects \ kmicromail/libmailwrapper/Makefile$(PLATFORM) + @@ -258,12 +256,2 @@ kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro -kaddressbook/xxport/opie/Makefile$(PLATFORM): kaddressbook/xxport/opie/opieE.pro - cd kaddressbook/xxport/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM) - -kaddressbook/xxport/qtopia/Makefile$(PLATFORM): kaddressbook/xxport/qtopia/qtopiaE.pro - cd kaddressbook/xxport/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM) - -kaddressbook/xxport/sharpdtm/Makefile$(PLATFORM): kaddressbook/xxport/sharpdtm/sharpdtmE.pro - cd kaddressbook/xxport/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM) - - kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 6020a46..57b299f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -43,2 +43,3 @@ #include "kdialogbase.h" +#include "kapplication.h" #include "kstandarddirs.h" @@ -693,2 +694,6 @@ void MainWindow::initActions() SLOT( about() ) ); + action = new QAction( "licence", i18n("Licence..."), 0, this ); + action->addTo( helpMenu ); + connect( action, SIGNAL( activated() ), + SLOT( licence() ) ); //menuBar->insertSeparator(); @@ -1062,2 +1067,7 @@ void MainWindow::whatsNew() } +void MainWindow::licence() +{ + KApplication::showLicence(); + +} void MainWindow::about() diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index a681f42..8a3f7b3 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -42,2 +42,3 @@ class MainWindow : public QMainWindow void about(); + void licence(); void faq(); diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index 1b3e689..f0de71e 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -1,2 +1,3 @@ #include <stdlib.h> +#include <stdio.h> @@ -4,2 +5,8 @@ #include <qapplication.h> +#include <qstring.h> +#include <qfile.h> +#include <qtextstream.h> +#include <qdialog.h> +#include <qlayout.h> +#include <qtextbrowser.h> @@ -27,3 +34,3 @@ QString KApplication::randomString(int length) } - int KApplication::execDialog( QDialog* d ) +int KApplication::execDialog( QDialog* d ) { @@ -33 +40,36 @@ QString KApplication::randomString(int length) } +void KApplication::showLicence() +{ + QString fileName ; + QString text; +#ifndef DESKTOP_VERSION + fileName = getenv("QPEDIR"); + fileName += "/pics/kdepim/LICENCE.TXT" ; +#else + fileName = qApp->applicationDirPath () + "/kdepim/LICENCE.TXT"; +#endif + QFile file( fileName ); + qDebug("Licence file name %s ",fileName.latin1() ); + if (!file.open( IO_ReadOnly ) ) { + return ; + } + QTextStream ts( &file ); + text = ts.read(); + file.close(); + + QDialog dia( 0, "name", true ); ; + dia.setCaption( "KDE-Pim/Pi licence" ); + QVBoxLayout* lay = new QVBoxLayout( &dia ); + lay->setSpacing( 3 ); + lay->setMargin( 3 ); + QTextBrowser tb ( &dia ); + lay->addWidget( &tb ); + tb.setText( text ); +#ifdef DESKTOP_VERSION + dia.resize( 640, 480); +#else + dia.showMaximized(); +#endif + dia.exec(); + +} diff --git a/microkde/kapplication.h b/microkde/kapplication.h index 77206f5..9515c60 100644 --- a/microkde/kapplication.h +++ b/microkde/kapplication.h @@ -19,2 +19,3 @@ class KApplication static int execDialog( QDialog* ); + static void showLicence(); }; |