summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-08-06 22:09:46 (UTC)
committer zautrix <zautrix>2004-08-06 22:09:46 (UTC)
commit72e30db97aa4984aace0d40a1d55762e4745937d (patch) (side-by-side diff)
treedb5d5ea0748d2fa6ba63c317649567f07750f9aa
parentacc0637eb0965d66b96d138d74514acf2cf24792 (diff)
downloadkdepimpi-72e30db97aa4984aace0d40a1d55762e4745937d.zip
kdepimpi-72e30db97aa4984aace0d40a1d55762e4745937d.tar.gz
kdepimpi-72e30db97aa4984aace0d40a1d55762e4745937d.tar.bz2
More licence stuff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/mainwindow.cpp27
-rw-r--r--microkde/kapplication.cpp9
-rw-r--r--microkde/kapplication.h1
3 files changed, 34 insertions, 3 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 24196b4..e020297 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -131,97 +131,122 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
//mailView->setMultiSelection ( true );
mailView->setSelectionMode( QListView::Extended );
QValueList<int> list;
int fw = 100;
if ( QApplication::desktop()->width() > 320 )
fw = 50;
list.append( fw );
list.append( 100 );
split->setSizes( list );
QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
mailView->setShowSortIndicator ( true );
QLabel *spacer = new QLabel( toolBar );
spacer->setBackgroundMode( QWidget::PaletteButton );
toolBar->setStretchableWidget( spacer );
QAction* closeMail = new QAction(tr("Close"),SmallIcon("exit"), 0, 0, this);
connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
closeMail->addTo(toolBar);
closeMail->addTo(mailMenu);
QPopupMenu* helpMenu = new QPopupMenu( menuBar );
menuBar->insertItem( tr( "Help" ), helpMenu );
QAction* li = new QAction(tr("About"), QPixmap(), 0, 0, this);
connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
li->addTo(helpMenu);
li = new QAction(tr("Licence"),QPixmap(), 0, 0, this);
connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
li->addTo(helpMenu);
li = new QAction(tr("LibEtPan Licence"), QPixmap(), 0, 0, this);
connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) );
li->addTo(helpMenu);
}
MainWindow::~MainWindow()
{
}
void MainWindow::showLicence()
{
KApplication::showLicence();
}
void MainWindow::showAbout()
{
- qDebug("MainWindow::showAbout() ");
+ QString version;
+#include <../version>
+
+ QString cap = "About KOpieMail/Pi";
+ QString text = i18n("KOpieMail/Platform-independent\n") +
+ "(OM/Pi) " + version + " - "
+
+#ifdef DESKTOP_VERSION
+ "Desktop Edition\n"
+#else
+ "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n"
+#endif
+ "www.pi-sync.net\n\n"
+
+
+
+"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n"
+ "KOpieMail/Pi is based on Opie Mail\n"
+ "Copyright (c) Rajko Albrecht and the Opie team\n"
+ "KOpieMail/Pi is licensed under the GPL\n"
+ "\n"
+ "KOpieMail/Pi uses LibEtPan - a mail stuff library\n"
+ "Copyright (C) 2001, 2002 - DINH Viet Hoa\n"
+ "libEtPan has its own licence - see LibEtPan licence\n";
+
+ KApplication::showText( cap, text );
}
void MainWindow::showEtpanLicence()
{
KApplication::showFile( "LibEtPan licence", "kdepim/kmicromail/COPYRIGHTlibetpan" );
}
void MainWindow::appMessage(const QCString &, const QByteArray &)
{
qDebug("appMessage implemented by subclass");
}
void MainWindow::slotAdjustLayout() {
/*
QWidget *d = QApplication::desktop();
if ( d->width() < d->height() ) {
layout->setDirection( QBoxLayout::TopToBottom );
} else {
layout->setDirection( QBoxLayout::LeftToRight );
}
*/
}
void MainWindow::slotAdjustColumns()
{
bool hidden = folderView->isHidden();
if ( hidden ) folderView->show();
folderView->setColumnWidth( 0, folderView->visibleWidth() );
if ( hidden ) folderView->hide();
mailView->setColumnWidth( 0, 10 );
mailView->setColumnWidth( 1, 100 );
mailView->setColumnWidth( 2, 100 );
mailView->setColumnWidth( 3, 50 );
mailView->setColumnWidth( 4, 120 );
}
void MainWindow::slotEditSettings()
{
}
void MainWindow::slotShowFolders( bool )
{
qDebug("not implemented: ");
}
void MainWindow::refreshMailView(const QValueList<RecMailP>&)
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index ad0b78e..98ef2f2 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -15,65 +15,70 @@ int KApplication::random()
return rand();
}
//US
QString KApplication::randomString(int length)
{
if (length <=0 ) return QString::null;
QString str;
while (length--)
{
int r=random() % 62;
r+=48;
if (r>57) r+=7;
if (r>90) r+=6;
str += char(r);
// so what if I work backwards?
}
return str;
}
int KApplication::execDialog( QDialog* d )
{
if (QApplication::desktop()->width() <= 640 )
d->showMaximized();
return d->exec();
}
void KApplication::showLicence()
{
KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/LICENCE.TXT" );
}
void KApplication::showFile(QString caption, QString fn)
{
QString text;
QString fileName;
#ifndef DESKTOP_VERSION
fileName = getenv("QPEDIR");
fileName += "/pics/" + fn ;
#else
fileName = qApp->applicationDirPath () + "/" + fn;
#endif
QFile file( fileName );
if (!file.open( IO_ReadOnly ) ) {
return ;
}
QTextStream ts( &file );
text = ts.read();
file.close();
-
+ KApplication::showText( caption, text );
+
+}
+
+void KApplication::showText(QString caption, QString text)
+{
QDialog dia( 0, "name", true ); ;
dia.setCaption( caption );
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 5ae5c00..79cdb33 100644
--- a/microkde/kapplication.h
+++ b/microkde/kapplication.h
@@ -1,25 +1,26 @@
#ifndef MINIKDE_KAPPLICATION_H
#define MINIKDE_KAPPLICATION_H
#include "qstring.h"
#include <qdialog.h>
class KApplication
{
public:
static int random();
//US
/**
* Generates a random string. It operates in the range [A-Za-z0-9]
* @param length Generate a string of this length.
* @return the random string
*/
static QString randomString(int length);
static int execDialog( QDialog* );
static void showLicence();
static void showFile(QString caption, QString file);
+ static void showText(QString caption, QString text);
};
#endif