summaryrefslogtreecommitdiff
path: root/noncore/unsupported
Side-by-side diff
Diffstat (limited to 'noncore/unsupported') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/filebrowser/filebrowser.cpp12
-rw-r--r--noncore/unsupported/gsmtool/gsmtool.cpp4
-rw-r--r--noncore/unsupported/mail2/bend/bend.cpp4
-rw-r--r--noncore/unsupported/mail2/composer.cpp8
-rw-r--r--noncore/unsupported/mail2/folderwidget.cpp24
-rw-r--r--noncore/unsupported/mail2/libmail/imaphandler.cpp6
-rw-r--r--noncore/unsupported/mail2/listviewplus.cpp4
-rw-r--r--noncore/unsupported/mail2/mailtable.cpp12
-rw-r--r--noncore/unsupported/mail2/mainwindow.cpp14
-rw-r--r--noncore/unsupported/mail2/searchdiag.cpp14
-rw-r--r--noncore/unsupported/mail2/viewmail.cpp4
-rw-r--r--noncore/unsupported/mailit/addatt.cpp4
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp32
-rw-r--r--noncore/unsupported/mailit/emailhandler.cpp22
-rw-r--r--noncore/unsupported/mailit/mailitwindow.cpp36
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp8
-rw-r--r--noncore/unsupported/oipkg/packagelistitem.cpp8
-rw-r--r--noncore/unsupported/oipkg/packagelistview.cpp8
-rw-r--r--noncore/unsupported/oipkg/pksettings.cpp2
-rw-r--r--noncore/unsupported/qpdf/qbusybar.cpp2
-rw-r--r--noncore/unsupported/qpdf/qpdf.cpp30
21 files changed, 129 insertions, 129 deletions
diff --git a/noncore/unsupported/filebrowser/filebrowser.cpp b/noncore/unsupported/filebrowser/filebrowser.cpp
index 8cf8a60..92a688a 100644
--- a/noncore/unsupported/filebrowser/filebrowser.cpp
+++ b/noncore/unsupported/filebrowser/filebrowser.cpp
@@ -239,52 +239,52 @@ FileView::FileView( const QString & dir, QWidget * parent,
menuTimer( this ),
le( NULL ),
itemToRename( NULL ),
showHidden( hidden ),
showSymlinks( symlinks ),
showThumbnails( thumbnails ),
menuKeepsOpen( FALSE )
{
addColumn( "Name" );
addColumn( "Size" );
addColumn( "Date" );
addColumn( "Type" );
setMultiSelection( TRUE );
//header()->hide();
setColumnWidthMode( 0, Manual );
setColumnWidthMode( 3, Manual );
// right align yize column
setColumnAlignment( 1, AlignRight );
generateDir( dir );
- connect( this, SIGNAL( clicked( QListViewItem * )),
- SLOT( itemClicked( QListViewItem * )) );
- connect( this, SIGNAL( doubleClicked( QListViewItem * )),
- SLOT( itemDblClicked( QListViewItem * )) );
+ connect( this, SIGNAL( clicked(QListViewItem*)),
+ SLOT( itemClicked(QListViewItem*)) );
+ connect( this, SIGNAL( doubleClicked(QListViewItem*)),
+ SLOT( itemDblClicked(QListViewItem*)) );
connect( this, SIGNAL( selectionChanged() ), SLOT( cancelMenuTimer() ) );
connect( &menuTimer, SIGNAL( timeout() ), SLOT( showFileMenu() ) );
}
void FileView::resizeEvent( QResizeEvent *e )
{
setColumnWidth( 0, width() - 2 * lineWidth() - 20 - columnWidth( 1 ) - columnWidth( 2 ) );
// hide type column, we use it for "sort by type" only
//setColumnWidth( 3, 0 );
QListView::resizeEvent( e );
}
void FileView::updateDir()
{
generateDir( currentDir );
}
void FileView::setDir( const QString & dir )
{
if ( dir.startsWith( "/dev" ) ) {
QMessageBox::warning( this, tr( "File Manager" ),
tr( "Can't show /dev/ directory." ), tr( "&Ok" ) );
return;
@@ -887,50 +887,50 @@ void FileBrowser::init(const QString & dir)
connect( a, SIGNAL( activated() ), fileView, SLOT( newFolder() ) );
a->addTo( toolBar );
a = new QAction( tr("Cut"), Resource::loadPixmap( "cut" ),
QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), fileView, SLOT( cut() ) );
a->addTo( toolBar );
a = new QAction( tr("Copy"), Resource::loadPixmap( "copy" ),
QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), fileView, SLOT( copy() ) );
a->addTo( toolBar );
pasteAction = new QAction( tr("Paste"), Resource::loadPixmap( "paste" ),
QString::null, 0, this, 0 );
connect( pasteAction, SIGNAL( activated() ), fileView, SLOT( paste() ) );
pasteAction->addTo( toolBar );
// dirLabel = new QLabel(this, "DirLabel");
connect( fileView, SIGNAL( dirChanged() ), SLOT( updateDirMenu() ) );
updateDirMenu();
QCopChannel* pcmciaChannel = new QCopChannel( "QPE/Card", this );
- connect( pcmciaChannel, SIGNAL(received(const QCString &, const QByteArray &)),
- this, SLOT(pcmciaMessage( const QCString &, const QByteArray &)) );
+ connect( pcmciaChannel, SIGNAL(received(const QCString&,const QByteArray&)),
+ this, SLOT(pcmciaMessage(const QCString&,const QByteArray&)) );
}
void FileBrowser::pcmciaMessage( const QCString &msg, const QByteArray &)
{
if ( msg == "mtabChanged()" ) {
// ## Only really needed if current dir is on a card
fileView->updateDir();
}
}
void FileBrowser::changeCaption(const QString & dir) {
setCaption( dir);
}
void FileBrowser::dirSelected( int id )
{
int i = 0, j;
QString dir;
// Bulid target dir from menu
while( (j = dirMenu->idAt( i )) != id ){
dir += dirMenu->text( j ).stripWhiteSpace();
if( dirMenu->text( j ) != "/" ) dir += "/";
i++;
diff --git a/noncore/unsupported/gsmtool/gsmtool.cpp b/noncore/unsupported/gsmtool/gsmtool.cpp
index 5940b0e..47920e5 100644
--- a/noncore/unsupported/gsmtool/gsmtool.cpp
+++ b/noncore/unsupported/gsmtool/gsmtool.cpp
@@ -16,52 +16,52 @@
#include <gsmlib/gsm_sorted_sms_store.h>
using namespace gsmlib;
/*
* Constructs a GSMTool which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
GSMTool::GSMTool( QWidget* parent, const char* name, WFlags fl )
: GSMToolBase( parent, name, fl )
{
devicelocked = 0;
me = NULL;
sms_store = NULL;
setConnected(FALSE);
/* FIXME: Persistent settings for device/baudrate */
connect(ConnectButton, SIGNAL(clicked()), this, SLOT(doConnectButton()));
connect(SMSDeleteButton, SIGNAL(clicked()), this, SLOT(doSMSDeleteButton()));
connect(SMSSendButton, SIGNAL(clicked()), this, SLOT(doSMSSendButton()));
connect(NewSMSClearButton, SIGNAL(clicked()), this, SLOT(doNewSMSClearButton()));
connect(NewSMSSaveButton, SIGNAL(clicked()), this, SLOT(doNewSMSSaveButton()));
connect(NewSMSSendButton, SIGNAL(clicked()), this, SLOT(doNewSMSSendButton()));
connect(ScanButton, SIGNAL(clicked()), this, SLOT(doScanButton()));
- connect(TabWidget2, SIGNAL(currentChanged(QWidget *)), this, SLOT(doTabChanged()));
+ connect(TabWidget2, SIGNAL(currentChanged(QWidget*)), this, SLOT(doTabChanged()));
connect(SMSStoreList, SIGNAL(activated(int)), this, SLOT(doSMSStoreChanged()));
connect(SMSViewType, SIGNAL(activated(int)), this, SLOT(doSMSTypeChanged()));
- connect(SMSList, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(doSelectedSMSChanged(QListViewItem *)));
+ connect(SMSList, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(doSelectedSMSChanged(QListViewItem*)));
timerid = -1; // Is this not possible normally?
}
/*
* Destroys the object and frees any allocated resources
*/
GSMTool::~GSMTool()
{
// no need to delete child widgets, Qt does it all for us
if (devicelocked)
unlockDevice();
}
const speed_t GSMTool::baudrates[12] = {
B300, B600, B1200, B2400, B4800, B9600, B19200,
B38400, B57600, B115200, B230400, B460800
};
int GSMTool::lockDevice( )
{
devicelocked = 1;
/* FIXME */
return 0;
}
diff --git a/noncore/unsupported/mail2/bend/bend.cpp b/noncore/unsupported/mail2/bend/bend.cpp
index e2ece2a..ab6eb45 100644
--- a/noncore/unsupported/mail2/bend/bend.cpp
+++ b/noncore/unsupported/mail2/bend/bend.cpp
@@ -65,57 +65,57 @@ void BenD::slotClicked()
void BenD::slotCheck()
{
// Check wether the check interval has been changed.
int newIntervalMs = _config->readNumEntry("CheckEvery", 5) * 60000;
if (newIntervalMs != _intervalMs) {
_intervalTimer->changeInterval(newIntervalMs);
_intervalMs = newIntervalMs;
#ifndef QT_NO_DEBUG
qWarning("BenD: Detected interval change");
#endif
}
QValueList<Account> acList = ConfigFile::getAccounts();
QValueList<Account>::Iterator ot;
for (ot = acList.begin(); ot != acList.end(); ot++) {
if (!((*ot).imapServer().isEmpty() ||
(*ot).imapPort().isEmpty() ||
(*ot).user().isEmpty() ||
(*ot).pass().isEmpty())) {
if (!((*ot).imapSsl() &&
(*ot).imapSslPort().isEmpty())) {
IMAPHandler *handler = new IMAPHandler(*ot);
handler->iStatus("INBOX", "RECENT");
- connect(handler, SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPStatus(IMAPResponse &)));
+ connect(handler, SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPStatus(IMAPResponse&)));
}
}
}
}
void BenD::slotIMAPStatus(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPStatus(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPStatus(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
if (response.STATUS()[0].recent().toInt() > 0) {
ODevice *device = ODevice::inst();
if (isHidden()) show();
if (_config->readBoolEntry("BlinkLed", true)) {
if ( !device-> ledList ( ). isEmpty ( )) {
OLed led = ( device-> ledList ( ). contains ( Led_Mail )) ? Led_Mail : device-> ledList ( ) [0];
device->setLedState(led, device-> ledStateList ( led ). contains ( Led_BlinkSlow ) ? Led_BlinkSlow : Led_On );
}
}
if (_config->readBoolEntry("PlaySound", false))
device->alarmSound();
} else {
ODevice *device = ODevice::inst();
if (!isHidden()) hide();
if ( !device-> ledList ( ). isEmpty ( )) {
OLed led = ( device-> ledList ( ). contains ( Led_Mail )) ? Led_Mail : device-> ledList ( ) [0];
device->setLedState(led, Led_Off);
}
}
response.imapHandler()->iLogout();
diff --git a/noncore/unsupported/mail2/composer.cpp b/noncore/unsupported/mail2/composer.cpp
index cb80299..da1aee9 100644
--- a/noncore/unsupported/mail2/composer.cpp
+++ b/noncore/unsupported/mail2/composer.cpp
@@ -137,50 +137,50 @@ void Composer::slotSendMail()
if (priority->currentItem() == POPUP_PRIO_LOW) {
smail.setPriority("Low"); // No i18n on purpose
} else if (priority->currentItem() == POPUP_PRIO_NORMAL) {
smail.setPriority("Normal"); // No i18n on purpose
} else if (priority->currentItem() == POPUP_PRIO_HIGH) {
smail.setPriority("High"); // No i18n on purpose
}
QValueList<Attachment> attachments;
QListViewItem *item;
for (item = attachView->firstChild(); item != 0; item = item->itemBelow()) {
attachments.append(((AttachViewItem *)item)->attachment());
}
smail.setAttachments(attachments);
QString header, message;
MailFactory::genMail(header, message, smail, this);
if (header.isNull() || message.isNull()) return; // Aborted.
status->setStopEnabled(true);
SmtpHandler *handler = new SmtpHandler(header, message, accountsLoaded[from->currentItem()], to->text());
connect(handler, SIGNAL(finished()), SLOT(slotSendFinished()));
- connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendError(const QString &)));
- connect(handler, SIGNAL(status(const QString &)), status, SLOT(setStatusText(const QString &)));
+ connect(handler, SIGNAL(error(const QString&)), SLOT(slotSendError(const QString&)));
+ connect(handler, SIGNAL(status(const QString&)), status, SLOT(setStatusText(const QString&)));
}
void Composer::slotSendQueued()
{
int effSendCount = 0;
qDebug("Sending queued messages");
Config cfg( "mailqueue", Config::User );
cfg.setGroup( "Settings" );
_sendCount = 0;
_sendError = 0;
_toSend = cfg.readNumEntry( "count", 0 );
if (_toSend == 0) close();
qDebug("%i messages to send", _toSend);
QString str;
for (int i=1;i<=_toSend;i++)
{
qDebug("sending message %i",i);
cfg.setGroup( "Mail_" + QString::number(i) );
SendMail smail;
str = cfg.readEntry("from");
qDebug("setFrom %s",str.latin1());
smail.setFrom( str );
@@ -226,50 +226,50 @@ void Composer::slotSendQueued()
for (int j = 0; i < ac; ac++) {
an = "Attachment_" + QString::number( j );
qDebug(an.latin1());
a.setFileName(cfg.readEntry( an + "fileName" ));
a.setNewName(cfg.readEntry( an + "newName" ));
a.setDescription(cfg.readEntry( an + "description" ));
a.setDocLnk( DocLnk( cfg.readEntry( an + "docLnk" )) );
attachments.append( a );
}
smail.setAttachments(attachments);
qDebug("putting mail together");
QString header, message;
MailFactory::genMail(header, message, smail, this);
if (header.isNull() || message.isNull()) continue;//return; // Aborted.
// abort->setEnabled(true);
qDebug("Sending to %s",toAdr.latin1());
SmtpHandler *handler = new SmtpHandler(header, message, accnt ,toAdr);
effSendCount++;
connect(handler, SIGNAL(finished()), SLOT(slotSendQueuedFinished()));
- connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendQueuedError(const QString &)));
- connect(handler, SIGNAL(status(const QString &)), status, SLOT(setStatusText(const QString &)));
+ connect(handler, SIGNAL(error(const QString&)), SLOT(slotSendQueuedError(const QString&)));
+ connect(handler, SIGNAL(status(const QString&)), status, SLOT(setStatusText(const QString&)));
}
if (effSendCount < _toSend)
{
_toSend = effSendCount;
QMessageBox::information(this, tr("Error"), tr("<p>There was a problem sending some of the queued mails.</p>"), tr("Ok"));
}
}
void Composer::slotQueueMail()
{
if (to->text().find(QRegExp(".*\\@.*\\..*")) == -1) {
QMessageBox::information(this, tr("Error"), tr("<p>You have to specify a recipient.<br>(eg: foo@bar.org)</p>"), tr("Ok"));
return;
}
Config cfg( "mailqueue", Config::User );
cfg.setGroup( "Settings" );
int count = cfg.readNumEntry( "count", 0 );
count++;
cfg.writeEntry( "count", count );
qDebug("queueing mail %i",count);
diff --git a/noncore/unsupported/mail2/folderwidget.cpp b/noncore/unsupported/mail2/folderwidget.cpp
index d27968b..a0520b1 100644
--- a/noncore/unsupported/mail2/folderwidget.cpp
+++ b/noncore/unsupported/mail2/folderwidget.cpp
@@ -39,49 +39,49 @@ FolderWidgetItem::FolderWidgetItem(Folder &folder, FolderWidgetItem *parent)
}
}
FolderWidget::FolderWidget(QWidget *parent, const char *name, WFlags fl)
: ListViewPlus(parent, name, fl)
{
header()->hide();
addColumn("");
setSorting(-1);
QPopupMenu *menu = new QPopupMenu();
menu->insertItem(tr("Rename"), MENU_RENAME);
menu->insertItem(tr("Delete"), MENU_DELETE);
menu->insertItem(tr("Move"), MENU_MOVE);
menu->insertItem(tr("Copy"), MENU_COPY);
menu->insertSeparator();
menu->insertItem(tr("Create folder"), MENU_CREATE);
menu->insertSeparator();
menu->insertItem(tr("Rescan folder list"), MENU_RESCAN);
setPopup(menu);
getAccounts();
connect(menu, SIGNAL(activated(int)), SLOT(slotMenuActivated(int)));
- connect(this, SIGNAL(clicked(QListViewItem *)), SLOT(slotItemClicked(QListViewItem *)));
+ connect(this, SIGNAL(clicked(QListViewItem*)), SLOT(slotItemClicked(QListViewItem*)));
}
FolderWidget::~FolderWidget()
{
// TODO: Save folder tree.
}
void FolderWidget::update()
{
getAccounts();
}
void FolderWidget::getAccounts()
{
clear();
QValueList<Account> accounts = ConfigFile::getAccounts();
QValueList<Account>::Iterator it;
for (it = accounts.begin(); it != accounts.end(); it++) {
FolderWidgetItem *item = addAccount(*it);
QFile f((QString) getenv("HOME") + "/Applications/mail/foldercache/foldercache-" + (*it).accountName());
if (!f.open(IO_ReadOnly)) {
Folder folder;
folder.setNoCache(true);
@@ -122,80 +122,80 @@ FolderWidgetItem *FolderWidget::addAccount(Account &account)
return new FolderWidgetItem(folder, this);
}
FolderWidgetItem *FolderWidget::addFolder(Folder &folder, FolderWidgetItem *folderWidgetItem)
{
return new FolderWidgetItem(folder, folderWidgetItem);
}
void FolderWidget::slotMenuActivated(int itemid)
{
if (currentItem() == NULL) {
QMessageBox::information(this, tr("Error"), tr("<p>Please select an item first.</p>"), tr("Ok"));
return;
}
if (itemid == MENU_RENAME) {
if (((FolderWidgetItem *)currentItem())->folder().fullName().isEmpty()) return;
Folder folder = ((FolderWidgetItem *)currentItem())->folder();
QString newName = Rename::rename(folder.fullName(), this);
if (newName.isNull()) return;
folder.topFolder().handler()->iRename(folder.fullName(), newName);
- connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPRename(IMAPResponse &)));
+ connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPRename(IMAPResponse&)));
} else if (itemid == MENU_DELETE) {
if (((FolderWidgetItem *)currentItem())->folder().fullName().isEmpty()) return;
Folder folder = ((FolderWidgetItem *)currentItem())->folder();
int ret = QMessageBox::information(this, tr("Question"), tr("<p>Do you really want to delete <pre>%1</pre>?").arg(folder.fullName()), tr("Yes"), tr("No"));
if (ret == 1) return;
_createFolder = folder;
folder.topFolder().handler()->iDelete(folder.fullName());
- connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPDelete(IMAPResponse &)));
+ connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPDelete(IMAPResponse&)));
} else if (itemid == MENU_MOVE) {
} else if (itemid == MENU_COPY) {
} else if (itemid == MENU_CREATE) {
Folder folder = (((FolderWidgetItem *)currentItem())->folder());
_createFolder = folder;
QString folderName = Rename::getText(tr("Foldername"), tr("<p>Please enter the name of the new folder.</p>"), this);
if (folderName.isNull()) return;
folder.topFolder().handler()->iCreate(folder.fullName() + folder.separator() + folderName);
- connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPCreate(IMAPResponse &)));
+ connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPCreate(IMAPResponse&)));
} else if (itemid == MENU_RESCAN) {
Folder folder = (((FolderWidgetItem *)currentItem())->folder());
_rescanAccount = folder.topFolder().account();
folder.topFolder().handler()->iList("", "*");
- connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &)));
+ connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPList(IMAPResponse&)));
}
}
void FolderWidget::slotItemClicked(QListViewItem *item)
{
if (item == NULL) return;
Folder folder = ((FolderWidgetItem *)item)->folder();
if (folder.fullName().isEmpty()) return;
emit folderSelected(folder);
}
void FolderWidget::slotIMAPLookingUpHost()
{
emit status(tr("Looking up host..."));
emit connecting();
}
void FolderWidget::slotIMAPHostFound()
{
emit status(tr("Host found."));
}
void FolderWidget::slotIMAPConnected()
@@ -206,103 +206,103 @@ void FolderWidget::slotIMAPConnected()
void FolderWidget::slotIMAPError(int error)
{
if (error == IMAPBase::IMAPErrConnectionRefused) {
QMessageBox::warning(this, tr("Error"), tr("<p>The IMAP connection was refused.</p>"), tr("Ok"));
} else if (error == IMAPBase::IMAPErrHostNotFound) {
QMessageBox::warning(this, tr("Error"), tr("<p>The host was not found.</p>"), tr("Ok"));
} else if (error == IMAPBase::IMAPErrSocketRead) {
QMessageBox::warning(this, tr("Error"), tr("<p>There was an error while reading from the socket.</p>"), tr("Ok"));
} else if (error == IMAPBase::IMAPErrLoginFailed) {
QMessageBox::warning(this, tr("Error"), tr("<p>Login failed. Check your password/username.</p>"), tr("Ok"));
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>An unknown error was encountered.</p>"), tr("Ok"));
}
}
void FolderWidget::slotIMAPDisconnected()
{
emit status(tr("Disconnected."));
emit disconnected();
}
void FolderWidget::slotIMAPLogin(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPLogin(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPLogin(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
emit status(tr("Login successful!"));
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>Login failed. Go away.</p>"), tr("Ok"));
}
}
void FolderWidget::slotIMAPRename(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPRename(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPRename(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
emit status(tr("Renaming successful!"));
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>Renaming failed. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok"));
}
}
void FolderWidget::slotIMAPDelete(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPDelete(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPDelete(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
emit status(tr("Deletion successful!"));
_rescanAccount = _createFolder.topFolder().account();
_createFolder.topFolder().handler()->iList(".", "*");
- connect(_createFolder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &)));
+ connect(_createFolder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPList(IMAPResponse&)));
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>Delete failed. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok"));
}
}
void FolderWidget::slotIMAPCreate(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPCreate(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPCreate(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
emit status(tr("Folder created. Rescanning..."));
_rescanAccount = _createFolder.topFolder().account();
_createFolder.topFolder().handler()->iList(".", "*");
- connect(_createFolder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPList(IMAPResponse &)));
+ connect(_createFolder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPList(IMAPResponse&)));
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>The folder could not be created. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok"));
}
}
void FolderWidget::slotIMAPList(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPList(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPList(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
QDir d((QString) getenv("HOME") + "/Applications/mail/foldercache");
if (!d.exists()) {
system("mkdir -p $HOME/Applications/mail/foldercache");
qWarning("Created $HOME/Applications/mail/foldercache.");
}
QFile f((QString) getenv("HOME") + "/Applications/mail/foldercache/foldercache-" + _rescanAccount.accountName());
if (!f.open(IO_WriteOnly)) {
QMessageBox::critical(this, tr("Error"), tr("<p>Couldn't open folder cache file for writing!</p>"), tr("Ok"));
return;
}
QTextStream t(&f);
QValueList<IMAPResponseLIST>::Iterator it;
QValueList<IMAPResponseLIST> lists = response.LIST();
for (it = lists.begin(); it != lists.end(); it++) {
t << (*it).folderSeparator() << "\n";
t << (*it).folder() << "\n";
}
f.close();
emit status(tr("Got folder list."));
diff --git a/noncore/unsupported/mail2/libmail/imaphandler.cpp b/noncore/unsupported/mail2/libmail/imaphandler.cpp
index dc97b28..8da0acd 100644
--- a/noncore/unsupported/mail2/libmail/imaphandler.cpp
+++ b/noncore/unsupported/mail2/libmail/imaphandler.cpp
@@ -1,38 +1,38 @@
#include "imapresponse.h"
#include "imaphandler.h"
#include "imapbase.h"
IMAPHandler::IMAPHandler(const Account &account)
: QObject(), _account(account)
{
_ready = false;
_loggingin = false;
_loggedin = false;
_tag = 0;
_ibase = new IMAPBase(account);
- connect(_ibase, SIGNAL(dataReceived(const QString &)), SLOT(slotDataReceived(const QString &)));
+ connect(_ibase, SIGNAL(dataReceived(const QString&)), SLOT(slotDataReceived(const QString&)));
connect(_ibase, SIGNAL(lookingUpHost()), SLOT(slotLookingUpHost()));
connect(_ibase, SIGNAL(hostFound()), SLOT(slotHostFound()));
connect(_ibase, SIGNAL(connected()), SLOT(slotConnected()));
connect(_ibase, SIGNAL(disconnected()), SLOT(slotDisconnected()));
connect(_ibase, SIGNAL(error(int)), SLOT(slotError(int)));
}
void IMAPHandler::doLogin()
{
if (_loggedin) return;
if (_loggingin) return;
_loggingin = true;
iLogin(_account.user(), _account.pass());
}
QString IMAPHandler::iCapability()
{
_ibase->sendCommand(QString("%1 CAPABILITY\r\n")
.arg(tag()));
return tag(false);
}
QString IMAPHandler::iNoop()
@@ -278,52 +278,52 @@ QString IMAPHandler::iX(const QString &commandAtom, const QString &arguments)
}
QString IMAPHandler::escape(const QString &in)
{
QString in_ = in;
return in_.replace(QRegExp("\""), "\\\"");
}
QString IMAPHandler::tag(bool count)
{
return QString("a%1").arg(count ? _tag++ : _tag);
}
void IMAPHandler::slotDataReceived(const QString &data)
{
if (!_ready) {
// The first data is always the greeting string.
// We can ignore it.
_ready = true;
return;
}
IMAPResponseParser parser;
-// connect ( &parser, SIGNAL( needMoreData ( QString & )), _ibase, SLOT( tryRead ( QString & )));
+// connect ( &parser, SIGNAL( needMoreData(QString&)), _ibase, SLOT( tryRead(QString&)));
parser. parse ( data );
IMAPResponse response = parser.response();
-// disconnect ( &parser, SIGNAL( needMoreData ( QString & )), _ibase, SLOT( tryRead ( QString & )));
+// disconnect ( &parser, SIGNAL( needMoreData(QString&)), _ibase, SLOT( tryRead(QString&)));
response.setImapHandler(this);
if (!_loggingin) { qDebug("Emitting gotResponse!\n" ); emit gotResponse(response); }
else {
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
_loggingin = false;
_loggedin = true;
qWarning("OK. Logged in. Leaving loggingin state.");
} else {
_loggingin = false;
emit IMAPError(IMAPBase::IMAPErrLoginFailed);
}
}
}
void IMAPHandler::slotLookingUpHost()
{
emit IMAPLookingUpHost();
}
void IMAPHandler::slotHostFound()
{
emit IMAPHostFound();
}
diff --git a/noncore/unsupported/mail2/listviewplus.cpp b/noncore/unsupported/mail2/listviewplus.cpp
index ce5f35f..722b347 100644
--- a/noncore/unsupported/mail2/listviewplus.cpp
+++ b/noncore/unsupported/mail2/listviewplus.cpp
@@ -7,48 +7,48 @@ ListViewPlus::ListViewPlus(QWidget *parent, const char *name, WFlags fl)
: QListView(parent, name, fl)
{
}
void ListViewPlus::keyPressEvent(QKeyEvent *event)
{
switch(event->key()) {
case Qt::Key_Space: // FALLTHROUGH
case Qt::Key_Enter:
if (currentItem() != 0)
emit clicked(currentItem());
break;
default: break;
}
QListView::keyPressEvent(event);
}
void ListViewPlus::setPopup(QPopupMenu *popup, int delay)
{
_popup = popup;
_delay = delay;
- connect(this, SIGNAL(pressed(QListViewItem *, const QPoint &, int)), SLOT(_initPopup(QListViewItem *, const QPoint &, int)));
- connect(this, SIGNAL(clicked(QListViewItem *, const QPoint &, int)), SLOT(_cancelPopup(QListViewItem *, const QPoint &, int)));
+ connect(this, SIGNAL(pressed(QListViewItem*,const QPoint&,int)), SLOT(_initPopup(QListViewItem*,const QPoint&,int)));
+ connect(this, SIGNAL(clicked(QListViewItem*,const QPoint&,int)), SLOT(_cancelPopup(QListViewItem*,const QPoint&,int)));
}
void ListViewPlus::_initPopup(QListViewItem *, const QPoint &point, int)
{
_point = point;
_timer = new QTimer();
_timer->start(_delay, true);
connect(_timer, SIGNAL(timeout()), this, SLOT(_showPopup()));
}
void ListViewPlus::_cancelPopup(QListViewItem *, const QPoint &, int)
{
delete _timer;
}
void ListViewPlus::_showPopup()
{
_popup->popup(_point);
}
diff --git a/noncore/unsupported/mail2/mailtable.cpp b/noncore/unsupported/mail2/mailtable.cpp
index fd179f0..56feab0 100644
--- a/noncore/unsupported/mail2/mailtable.cpp
+++ b/noncore/unsupported/mail2/mailtable.cpp
@@ -53,119 +53,119 @@ MailTable::MailTable(QWidget *parent, const char *name, WFlags fl)
_stopped = false;
setSorting(-1);
setAllColumnsShowFocus(true);
addColumn(tr("From"), 100);
addColumn(tr("Subject"), 100);
addColumn(tr("Date"), 100);
QPopupMenu *menu = new QPopupMenu(this);
menu->insertItem(tr("Copy"), MENU_COPY);
QPopupMenu *markMenu = new QPopupMenu(this);
markMenu->insertItem(tr("Seen"), MENU_MARK_READ);
markMenu->insertItem(tr("Unseen"), MENU_MARK_UNREAD);
markMenu->insertSeparator();
markMenu->insertItem(tr("Marked"), MENU_MARK_MARKED);
markMenu->insertItem(tr("Unmarked"), MENU_MARK_UNMARKED);
menu->insertItem(tr("Mark as..."), markMenu, MENU_MARK);
menu->insertSeparator();
menu->insertItem(tr("Delete Mail"), MENU_DELETE);
setPopup(menu);
- connect(this, SIGNAL(clicked(QListViewItem *)), SLOT(itemClicked(QListViewItem *)));
+ connect(this, SIGNAL(clicked(QListViewItem*)), SLOT(itemClicked(QListViewItem*)));
}
void MailTable::setFolder(Folder folder)
{
folder.topFolder().handler()->iSelect(folder.fullName());
_handler = folder.topFolder().handler();
- connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPSelect(IMAPResponse &)));
+ connect(folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPSelect(IMAPResponse&)));
}
void MailTable::setHeaders(QValueList<IMAPResponseFETCH> response)
{
clear();
QValueList<IMAPResponseFETCH>::Iterator it;
for (it = response.begin(); it != response.end(); it++) {
(void) new MailTableItem(this, *it);
}
}
void MailTable::slotIMAPSelect(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPSelect(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPSelect(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
clear();
QString mails = response.EXISTS()[0].mails();
if (mails.toInt() == 0) {
emit status(tr("Mailbox contained no mails."));
return;
}
int a = mails.toInt() / 5;
int b = mails.toInt() % 5;
_downloadSteps = a;
if (b > 0) _downloadSteps++;
_lastStep = b;
_currentProgress = 0;
emit totalSteps(_downloadSteps);
emit progress(_currentProgress);
emit stopEnabled(true);
response.imapHandler()->iFetch(QString("1:%1").arg((a == 0) ? b : 5), "ENVELOPE FLAGS UID");
emit status(tr("Getting mail headers..."));
- connect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPFetch(IMAPResponse &)));
+ connect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPFetch(IMAPResponse&)));
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>An error occoured during the selection of the mailbox. (Server said: %1)</p>").arg(response.statusResponse().comment()), tr("Ok"));
}
}
void MailTable::slotIMAPFetch(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPFetch(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPFetch(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
QValueList<IMAPResponseFETCH>::Iterator it;
QValueList<IMAPResponseFETCH> fetch = response.FETCH();
for (it = fetch.begin(); it != fetch.end(); it++) {
(void) new MailTableItem(this, *it);
}
emit progress(++_currentProgress);
if (_currentProgress != _downloadSteps) {
if (_stopped) {
_currentProgress = 0;
_downloadSteps = 0;
_lastStep = 0;
_stopped = false;
emit status(tr("Stopped"));
emit resetProgress();
emit stopEnabled(false);
} else {
response.imapHandler()->iFetch(QString("%1:%2").arg(_currentProgress * 5 + 1).arg((_currentProgress + 1 == _downloadSteps) ? _currentProgress * 5 + _lastStep : _currentProgress * 5 + 5), "ENVELOPE FLAGS UID");
- connect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPFetch(IMAPResponse &)));
+ connect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPFetch(IMAPResponse&)));
}
} else {
_currentProgress = 0;
_downloadSteps = 0;
_lastStep = 0;
emit status(tr("Got all mail headers."));
emit resetProgress();
emit stopEnabled(false);
}
} else {
emit status(tr("<font color=#ff0000>Couldn't fetch mail."));
}
}
void MailTable::itemClicked(QListViewItem *item)
{
if (item == NULL) return;
emit mailClicked(((MailTableItem *)item)->fetch(), _handler);
}
diff --git a/noncore/unsupported/mail2/mainwindow.cpp b/noncore/unsupported/mail2/mainwindow.cpp
index 0d09ec8..ce80391 100644
--- a/noncore/unsupported/mail2/mainwindow.cpp
+++ b/noncore/unsupported/mail2/mainwindow.cpp
@@ -1,70 +1,70 @@
#include <qmessagebox.h>
#include <qaction.h>
#include <qapplication.h>
#include <qpe/qcopenvelope_qws.h>
#include "mailstatusbar.h"
#include "folderwidget.h"
#include "mainwindow.h"
#include "configdiag.h"
#include "configfile.h"
#include "searchdiag.h"
#include "mailtable.h"
#include "composer.h"
#include "viewmail.h"
#include "mailfactory.h"
MainWindow::MainWindow(QWidget *parent, const char *name, WFlags fl)
: MainWindowBase(parent, name, fl)
{
status->setStopEnabled(false);
- connect(folderView, SIGNAL(status(const QString &)), status, SLOT(setStatusText(const QString &)));
+ connect(folderView, SIGNAL(status(const QString&)), status, SLOT(setStatusText(const QString&)));
connect(folderView, SIGNAL(folderSelected(Folder)), mailView, SLOT(setFolder(Folder)));
- connect(mailView, SIGNAL(mailClicked(IMAPResponseFETCH, IMAPHandler *)), SLOT(mailClicked(IMAPResponseFETCH, IMAPHandler *)));
- connect(mailView, SIGNAL(status(const QString &)), status, SLOT(setStatusText(const QString &)));
+ connect(mailView, SIGNAL(mailClicked(IMAPResponseFETCH,IMAPHandler*)), SLOT(mailClicked(IMAPResponseFETCH,IMAPHandler*)));
+ connect(mailView, SIGNAL(status(const QString&)), status, SLOT(setStatusText(const QString&)));
connect(mailView, SIGNAL(totalSteps(int)), status, SLOT(setProgressTotalSteps(int)));
connect(mailView, SIGNAL(progress(int)), status, SLOT(setProgress(int)));
connect(mailView, SIGNAL(resetProgress()), status, SLOT(resetProgress()));
connect(mailView, SIGNAL(stopEnabled(bool)), status, SLOT(setStopEnabled(bool)));
connect(status, SIGNAL(stop()), mailView, SLOT(stop()));
connect(compose, SIGNAL(activated()), SLOT(slotComposeNoParams()));
connect(sendQueue, SIGNAL(activated()), SLOT(slotSendQueued()));
connect(findmails, SIGNAL(activated()), SLOT(slotSearch()));
connect(configure, SIGNAL(activated()), SLOT(slotConfigure()));
// Added by Stefan Eilers to allow starting by addressbook..
#if !defined(QT_NO_COP)
// QCopChannel *addressChannel = new QCopChannel("QPE/Application/mail" , this );
-// connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)),
-// this, SLOT ( appMessage(const QCString &, const QByteArray &) ) );
- connect( qApp, SIGNAL( appMessage( const QCString&, const QByteArray& ) ),
- this, SLOT( appMessage( const QCString&, const QByteArray& ) ) );
+// connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)),
+// this, SLOT ( appMessage(const QCString&,const QByteArray&) ) );
+ connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ),
+ this, SLOT( appMessage(const QCString&,const QByteArray&) ) );
#endif
}
// Added by Stefan Eilers to allow starting by addressbook..
void MainWindow::appMessage(const QCString &msg, const QByteArray &data)
{
if (msg == "writeMail(QString,QString)") {
QDataStream stream(data,IO_ReadOnly);
QString name, email;
stream >> name >> email;
qWarning("opie-mail:: Should send mail to %s with address %s", name.latin1(), email.latin1() );
slotCompose( name, email );
}else{
QString str_message = msg;
qWarning("opie-mail:: Received unknown QCop-Message: %s", str_message.latin1() );
}
}
void MainWindow::slotCompose( const QString& name, const QString& email )
{
Composer composer(this, 0, true);
diff --git a/noncore/unsupported/mail2/searchdiag.cpp b/noncore/unsupported/mail2/searchdiag.cpp
index 907f6ff..6fb4e4d 100644
--- a/noncore/unsupported/mail2/searchdiag.cpp
+++ b/noncore/unsupported/mail2/searchdiag.cpp
@@ -7,122 +7,122 @@
#include "imaphandler.h"
#include "searchdiag.h"
#include "viewmail.h"
#define INMENU_BODY 0
#define INMENU_HEADERF 1
#define INMENU_SUBJECT 2
#define INMENU_FROM 3
#define INMENU_TO 4
SearchDiag::SearchDiag(QWidget *parent, const char *name, WFlags fl)
: SearchDiagBase(parent, name, fl)
{
_selected = false;
in->insertItem(tr("Body"), INMENU_BODY);
in->insertItem(tr("Header Field"), INMENU_HEADERF);
in->insertItem(tr("Subject"), INMENU_SUBJECT);
in->insertItem(tr("From"), INMENU_FROM);
in->insertItem(tr("To"), INMENU_TO);
connect(folderView, SIGNAL(folderSelected(Folder)), SLOT(folderSelected(Folder)));
connect(in, SIGNAL(activated(int)), SLOT(slotInItemActivated(int)));
- connect(mailTable, SIGNAL(mailClicked(IMAPResponseFETCH, IMAPHandler *)), SLOT(slotMailClicked(IMAPResponseFETCH, IMAPHandler *)));
+ connect(mailTable, SIGNAL(mailClicked(IMAPResponseFETCH,IMAPHandler*)), SLOT(slotMailClicked(IMAPResponseFETCH,IMAPHandler*)));
}
void SearchDiag::accept()
{
if (searchFor->text().isEmpty()) {
QMessageBox::information(this, tr("Error"), tr("<p>Please enter what to search for.</p>"), tr("Ok"));
return;
}
if (!_selected) {
QMessageBox::information(this, tr("Error"), tr("<p>Please select a folder.</p>"), tr("Ok"));
return;
}
if (in->currentItem() == INMENU_HEADERF && other->currentText().isEmpty()) {
QMessageBox::information(this, tr("Error"), tr("<p>Please enter a header field to search in.</p>"), tr("Ok"));
return;
}
_folder.topFolder().handler()->iSelect(_folder.fullName());
- connect(_folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPSelect(IMAPResponse &)));
+ connect(_folder.topFolder().handler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPSelect(IMAPResponse&)));
}
void SearchDiag::folderSelected(Folder folder)
{
_selected = true;
_folder = folder;
}
void SearchDiag::slotIMAPSelect(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPSelect(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPSelect(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
if (in->currentItem() == INMENU_BODY) {
response.imapHandler()->iSearch("BODY \"" + searchFor->text() + "\"");
} else if (in->currentItem() == INMENU_HEADERF) {
response.imapHandler()->iSearch("HEADER \""+ other->currentText() + "\" \"" + searchFor->text() + "\"");
} else if (in->currentItem() == INMENU_SUBJECT) {
response.imapHandler()->iSearch("SUBJECT \"" + searchFor->text() + "\"");
} else if (in->currentItem() == INMENU_FROM) {
response.imapHandler()->iSearch("FROM \"" + searchFor->text() + "\"");
} else if (in->currentItem() == INMENU_TO) {
response.imapHandler()->iSearch("TO \"" + searchFor->text() + "\"");
} else return;
- connect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPSearch(IMAPResponse &)));
+ connect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPSearch(IMAPResponse&)));
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>Could not select the folder. Aborting. (Server said: %1)").arg(response.statusResponse().comment()), tr("Ok"));
}
}
void SearchDiag::slotIMAPSearch(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPSearch(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPSearch(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
IMAPResponseSEARCH results = response.SEARCH()[0];
if (results.mails().count() == 0) {
QMessageBox::information(this, tr("Results"), tr("<p>No mails match your criteria.</p>"), tr("Ok"));
return;
}
response.imapHandler()->iFetch(results.mails().join(","), "ENVELOPE FLAGS UID");
- connect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPFetch(IMAPResponse &)));
+ connect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPFetch(IMAPResponse&)));
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>Search failed. (Server said: %1)").arg(response.statusResponse().comment()), tr("Ok"));
}
}
void SearchDiag::slotIMAPFetch(IMAPResponse &response)
{
- disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPSearch(IMAPResponse &)));
+ disconnect(response.imapHandler(), SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPSearch(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
mailTable->setHeaders(response.FETCH());
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>Couldn't fetch the mail headers. (Server said: %1)").arg(response.statusResponse().comment()));
}
}
void SearchDiag::slotMailClicked(IMAPResponseFETCH fetch, IMAPHandler *)
{
ViewMail viewMail(fetch, _folder.topFolder().handler(), this, 0, true);
viewMail.showMaximized();
viewMail.exec();
}
void SearchDiag::slotInItemActivated(int index)
{
if (index == INMENU_HEADERF) {
other->setEnabled(true);
} else {
other->setEnabled(false);
}
}
diff --git a/noncore/unsupported/mail2/viewmail.cpp b/noncore/unsupported/mail2/viewmail.cpp
index da6924d..0cfb6e5 100644
--- a/noncore/unsupported/mail2/viewmail.cpp
+++ b/noncore/unsupported/mail2/viewmail.cpp
@@ -38,49 +38,49 @@ ViewMail::ViewMail(IMAPResponseFETCH &mail, IMAPHandler *handler, QWidget *paren
"%5"
"<b>Date:</b> %6<hr>"
"<font face=fixed>%7</font>")
.arg(deHtml(mail.envelope().subject().isNull() ? tr("(no subject)")
: deHtml(mail.envelope().subject())))
.arg(deHtml(mail.envelope().from().toString().isNull() ? tr("(no from)")
: mail.envelope().from().toString()))
.arg(deHtml(mail.envelope().to().toString().isNull() ? tr("(no recipient)")
: mail.envelope().to().toString()))
.arg(mail.envelope().cc().toString().isNull() ? QString(0)
: tr("<b>Cc:</b> %1<br>").arg(deHtml(mail.envelope().cc().toString())))
.arg(mail.envelope().bcc().toString().isNull() ? QString(0)
: tr("<b>Bcc:</b> %1<br>").arg(deHtml(mail.envelope().bcc().toString())))
.arg(mail.envelope().mailDate().isNull() ? tr("(no date)")
: mail.envelope().mailDate())
.arg("%1");
connect(reply, SIGNAL(activated()), SLOT(slotReply()));
connect(forward, SIGNAL(activated()), SLOT(slotForward()));
attachments->setEnabled(_gotBody);
browser->setText(QString(_mailHtml).arg(tr("Getting mail body from server. Please wait...")));
_handler->iUid("FETCH", QString("%1 (BODY[1])").arg(mail.uid()));
- connect(_handler, SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPUid(IMAPResponse &)));
+ connect(_handler, SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPUid(IMAPResponse&)));
}
ViewMail::~ViewMail()
{
hide();
}
void ViewMail::hide()
{
QWidget::hide();
if (_inLoop) {
_inLoop = false;
qApp->exit_loop();
}
}
void ViewMail::exec()
{
show();
if (!_inLoop) {
_inLoop = true;
qApp->enter_loop();
@@ -158,41 +158,41 @@ void ViewMail::slotForward()
if (!_mail.envelope().bcc().toString().isNull())
ftext += QString("Bcc: %1\n")
.arg(_mail.envelope().bcc().toString());
if (!_mail.envelope().subject().isNull())
ftext += QString("Subject: %1\n")
.arg(_mail.envelope().subject());
ftext += QString("\n%1\n")
.arg(_mail.bodyPart(1).data());
ftext += QString("----- End forwarded message -----\n");
SendMail sendMail;
sendMail.setSubject("Fwd: " + _mail.envelope().subject());
sendMail.setMessage(ftext);
Composer composer(this, 0, true);
composer.setSendMail(sendMail);
composer.showMaximized();
composer.exec();
}
void ViewMail::slotIMAPUid(IMAPResponse &response)
{
- disconnect(_handler, SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPUid(IMAPResponse &)));
+ disconnect(_handler, SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPUid(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
QValueList<IMAPResponseBodyPart> bodyParts;
bodyParts.append(response.FETCH()[0].bodyPart(0));
_mail.setBodyParts(bodyParts);
browser->setText(QString(_mailHtml).arg(deHtml(response.FETCH()[0].bodyPart(0).data())));
// fillList(response.FETCH()[0].bodyStructure());
_gotBody = true;
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>I was unable to retrieve the mail from the server. You can try again later or give up.</p>"), tr("Ok"));
}
}
diff --git a/noncore/unsupported/mailit/addatt.cpp b/noncore/unsupported/mailit/addatt.cpp
index 19ac58f..420f84c 100644
--- a/noncore/unsupported/mailit/addatt.cpp
+++ b/noncore/unsupported/mailit/addatt.cpp
@@ -69,56 +69,56 @@ AddAtt::AddAtt(QWidget *parent, const char *name, WFlags f)
fileCategoryButton->setPopup(fileCategories);
fileCategories->insertItem("Document");
fileCategories->insertItem("Picture");
fileCategories->insertItem("Sound");
fileCategories->insertItem("Movie");
fileCategories->insertItem("File");
fileCategoryButton->setText("Document");
top->addWidget(fileCategoryButton, 0, 0);*/
top->addWidget(buttons,1,0);
//buttons->addWidget(attachButton,0,0);
//buttons->addWidget(removeButton,0,1);
//connect(fileCategories, SIGNAL(activated(int)), this,
// SLOT(fileCategorySelected(int)) );*/
connect(attachButton, SIGNAL(clicked()), this,
SLOT(addattachment()) );
connect(removeButton, SIGNAL(clicked()), this,
SLOT(removeattachment()) );
/*listView = new QListView(this, "AttView");
listView->addColumn("Documents");*
- connect(listView, SIGNAL(doubleClicked(QListViewItem *)), this,
+ connect(listView, SIGNAL(doubleClicked(QListViewItem*)), this,
SLOT(addattachment()) );*/
attView = new QListView(this, "Selected");
attView->addColumn(tr("Attached"));
attView->addColumn(tr("File type"));
- connect(attView, SIGNAL(doubleClicked(QListViewItem *)), this,
+ connect(attView, SIGNAL(doubleClicked(QListViewItem*)), this,
SLOT(removeattachment()) );
//top->addWidget(ofs, 0,0);
top->addWidget(attView, 0,0);
clear();
}
void AddAtt::clear()
{
attView->clear();
//getFiles();
modified = FALSE;
}
/*void AddAtt::fileCategorySelected(int id)
{
fileCategoryButton->setText(fileCategories->text(id));
getFiles();
}*/
void AddAtt::addattachment()
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index 8359acf..86c7987 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -38,80 +38,80 @@ MailAccount* AccountList::dupl(MailAccount *in)
{
ac = new MailAccount(*in);
return ac;
}
EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl )
: QMainWindow( parent, name, fl )
{
emailHandler = new EmailHandler();
addressList = new AddressList();
sending = FALSE;
receiving = FALSE;
previewingMail = FALSE;
mailIdCount = 1;
accountIdCount = 1;
allAccounts = FALSE;
init();
connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) );
- connect(emailHandler, SIGNAL(smtpError(int,const QString &)), this,
- SLOT(smtpError(int,const QString &)) );
- connect(emailHandler, SIGNAL(popError(int,const QString &)), this,
- SLOT(popError(int,const QString &)) );
+ connect(emailHandler, SIGNAL(smtpError(int,const QString&)), this,
+ SLOT(smtpError(int,const QString&)) );
+ connect(emailHandler, SIGNAL(popError(int,const QString&)), this,
+ SLOT(popError(int,const QString&)) );
- connect(inboxView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(inboxItemSelected()) );
- connect(outboxView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(outboxItemSelected()) );
+ connect(inboxView, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(inboxItemSelected()) );
+ connect(outboxView, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(outboxItemSelected()) );
- connect(inboxView, SIGNAL(pressed(QListViewItem *)), this, SLOT(inboxItemPressed()) );
- connect(inboxView, SIGNAL(clicked(QListViewItem *)), this, SLOT(inboxItemReleased()) );
+ connect(inboxView, SIGNAL(pressed(QListViewItem*)), this, SLOT(inboxItemPressed()) );
+ connect(inboxView, SIGNAL(clicked(QListViewItem*)), this, SLOT(inboxItemReleased()) );
- connect(emailHandler, SIGNAL(mailArrived(const Email &, bool)), this,
- SLOT(mailArrived(const Email &, bool)) );
+ connect(emailHandler, SIGNAL(mailArrived(const Email&,bool)), this,
+ SLOT(mailArrived(const Email&,bool)) );
connect(emailHandler, SIGNAL(mailTransfered(int)), this,
SLOT(allMailArrived(int)) );
mailconf = new Config("mailit");
//In case Synchronize is not defined in settings.txt
readSettings();
updateAccounts();
lineShift = "\n";
readMail();
lineShift = "\r\n";
mailboxView->setCurrentTab(0); //ensure that inbox has focus
/*channel = new QCopChannel( "QPE/Application/mailit", this );
- connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
- this, SLOT(receive(const QCString&, const QByteArray&)) );*/
+ connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
+ this, SLOT(receive(const QCString&,const QByteArray&)) );*/
}
EmailClient::~EmailClient()
{
//needs to be moved from destructor to closewindow event
saveMail(getPath(FALSE) + "inbox.txt", inboxView);
//does not currently work. Defining outbox in the same
//format as inbox is not a good solution as they have
//different properties
saveMail(getPath(FALSE) + "outbox.txt", outboxView);
saveSettings();
mailconf->write();
delete mailconf;
}
void EmailClient::init()
{
initStatusBar(this);
setToolBarsMovable(FALSE);
@@ -196,52 +196,52 @@ void EmailClient::init()
// grid_3->setMargin( 11 );
outboxView = new QListView( widget_2, "outboxView" );
outboxView->addColumn( tr( "To" ) );
outboxView->addColumn( tr( "Subject" ) );
outboxView->setAllColumnsShowFocus(TRUE);
QWhatsThis::add(outboxView,QWidget::tr("This is the outbox view.\n"
"It keeps the queued mails to send which can be \n"
"reviewed by double clicking the entry."));
grid_3->addWidget( outboxView, 0, 0 );
mailboxView->addTab( widget_2,"mailit/outbox", tr( "Outbox" ) );
setCentralWidget(mailboxView);
}
void EmailClient::initStatusBar(QWidget* parent)
{
statusBar = new QStatusBar(parent);
statusBar->setSizeGripEnabled(FALSE);
status1Label = new QLabel( tr("Idle"), statusBar);
status2Label = new QLabel("", statusBar);
- connect(emailHandler, SIGNAL(updatePopStatus(const QString &)),
- status2Label, SLOT(setText(const QString &)) );
- connect(emailHandler, SIGNAL(updateSmtpStatus(const QString &)),
- status2Label, SLOT(setText(const QString &)) );
+ connect(emailHandler, SIGNAL(updatePopStatus(const QString&)),
+ status2Label, SLOT(setText(const QString&)) );
+ connect(emailHandler, SIGNAL(updateSmtpStatus(const QString&)),
+ status2Label, SLOT(setText(const QString&)) );
progressBar = new QProgressBar(statusBar);
connect(emailHandler, SIGNAL(mailboxSize(int)),
this, SLOT(setTotalSize(int)) );
connect(emailHandler, SIGNAL(currentMailSize(int)),
this, SLOT(setMailSize(int)) );
connect(emailHandler, SIGNAL(downloadedSize(int)),
this, SLOT(setDownloadedSize(int)) );
statusBar->addWidget(status1Label);
statusBar->addWidget(progressBar);
statusBar->addWidget(status2Label);
}
void EmailClient::compose()
{
emit composeRequested();
}
void EmailClient::cancel()
{
emailHandler->cancel();
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp
index 06e978d..02b3e9a 100644
--- a/noncore/unsupported/mailit/emailhandler.cpp
+++ b/noncore/unsupported/mailit/emailhandler.cpp
@@ -23,60 +23,60 @@
#include <qmessagebox.h>
#include <qcstring.h>
#include "emailhandler.h"
#include <qpe/applnk.h>
#include <qpe/filemanager.h>
QCollection::Item EnclosureList::newItem(QCollection::Item d)
{
return dupl( (Enclosure *) d);
}
Enclosure* EnclosureList::dupl(Enclosure *in)
{
ac = new Enclosure(*in);
return ac;
}
EmailHandler::EmailHandler()
{
qDebug("EMailHandler::EmailHandler");
smtpClient = new SmtpClient();
popClient = new PopClient();
- connect(smtpClient, SIGNAL(errorOccurred(int, const QString &)), this,
- SIGNAL(smtpError(int, const QString &)) );
+ connect(smtpClient, SIGNAL(errorOccurred(int,const QString&)), this,
+ SIGNAL(smtpError(int,const QString&)) );
connect(smtpClient, SIGNAL(mailSent()), this, SIGNAL(mailSent()) );
- connect(smtpClient, SIGNAL(updateStatus(const QString &)), this,
- SIGNAL(updateSmtpStatus(const QString &)) );
-
- connect(popClient, SIGNAL(errorOccurred(int, const QString &)), this,
- SIGNAL(popError(int, const QString &)) );
- connect(popClient, SIGNAL(newMessage(const QString &, int, uint, bool)),
- this, SLOT(messageArrived(const QString &, int, uint, bool)) );
- connect(popClient, SIGNAL(updateStatus(const QString &)), this,
- SIGNAL(updatePopStatus(const QString &)) );
+ connect(smtpClient, SIGNAL(updateStatus(const QString&)), this,
+ SIGNAL(updateSmtpStatus(const QString&)) );
+
+ connect(popClient, SIGNAL(errorOccurred(int,const QString&)), this,
+ SIGNAL(popError(int,const QString&)) );
+ connect(popClient, SIGNAL(newMessage(const QString&,int,uint,bool)),
+ this, SLOT(messageArrived(const QString&,int,uint,bool)) );
+ connect(popClient, SIGNAL(updateStatus(const QString&)), this,
+ SIGNAL(updatePopStatus(const QString&)) );
connect(popClient, SIGNAL(mailTransfered(int)), this,
SIGNAL(mailTransfered(int)) );
//relaying size information
connect(popClient, SIGNAL(currentMailSize(int)),
this, SIGNAL(currentMailSize(int)) );
connect(popClient, SIGNAL(downloadedSize(int)),
this, SIGNAL(downloadedSize(int)) );
}
void EmailHandler::sendMail(QList<Email> *mailList)
{
Email *currentMail;
QString temp;
QString userName = QString::null;
// not supported by ALL SMTP servers in the MAIL From field
// userName = "\""+mailAccount.name+"\"";
userName += "<" + mailAccount.emailAddress + ">";
for (currentMail = mailList->first(); currentMail != 0;
currentMail = mailList->next()) {
if (encodeMime(currentMail) == 0) {
diff --git a/noncore/unsupported/mailit/mailitwindow.cpp b/noncore/unsupported/mailit/mailitwindow.cpp
index 6e298c7..fec4d78 100644
--- a/noncore/unsupported/mailit/mailitwindow.cpp
+++ b/noncore/unsupported/mailit/mailitwindow.cpp
@@ -16,74 +16,74 @@
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include <qwhatsthis.h>
#include <qmessagebox.h>
#include "mailitwindow.h"
MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags /*fl*/)
: QMainWindow(parent, name, WStyle_ContextHelp)
{
currentCaption = tr("Mailit");
setCaption(tr(currentCaption));
views = new QWidgetStack(this);
setCentralWidget(views);
QWhatsThis::add(views,tr("Central view area"));
emailClient = new EmailClient(views, "client");
writeMail = new WriteMail(views, "writing");
readMail = new ReadMail(views, "reading");
views->raiseWidget(emailClient);
connect(emailClient, SIGNAL(composeRequested()),
this, SLOT(compose()) );
- connect(emailClient, SIGNAL(viewEmail(QListView *, Email *)), this,
- SLOT(viewMail(QListView *, Email *)) );
- connect(emailClient, SIGNAL(mailUpdated(Email *)), this,
- SLOT(updateMailView(Email *)) );
+ connect(emailClient, SIGNAL(viewEmail(QListView*,Email*)), this,
+ SLOT(viewMail(QListView*,Email*)) );
+ connect(emailClient, SIGNAL(mailUpdated(Email*)), this,
+ SLOT(updateMailView(Email*)) );
connect(writeMail, SIGNAL(cancelMail()), this, SLOT(showEmailClient()) );
- connect(writeMail, SIGNAL(sendMailRequested(const Email &)), this,
+ connect(writeMail, SIGNAL(sendMailRequested(const Email&)), this,
SLOT(showEmailClient()) );
- connect(writeMail, SIGNAL(sendMailRequested(const Email &)), emailClient,
- SLOT(enqueMail(const Email &)) );
+ connect(writeMail, SIGNAL(sendMailRequested(const Email&)), emailClient,
+ SLOT(enqueMail(const Email&)) );
connect(readMail, SIGNAL(cancelView()), this, SLOT(showEmailClient()) );
- connect(readMail, SIGNAL(replyRequested(Email &, bool&)), this,
- SLOT(composeReply(Email &, bool&)) );
- connect(readMail, SIGNAL(forwardRequested(Email &)), this,
- SLOT(composeForward(Email &)) );
+ connect(readMail, SIGNAL(replyRequested(Email&,bool&)), this,
+ SLOT(composeReply(Email&,bool&)) );
+ connect(readMail, SIGNAL(forwardRequested(Email&)), this,
+ SLOT(composeForward(Email&)) );
- connect(readMail, SIGNAL(removeItem(EmailListItem *, bool &)), emailClient,
- SLOT(deleteMail(EmailListItem *, bool &)) );
- connect(readMail, SIGNAL(viewingMail(Email *)), emailClient,
- SLOT(moveMailFront(Email *)) );
+ connect(readMail, SIGNAL(removeItem(EmailListItem*,bool&)), emailClient,
+ SLOT(deleteMail(EmailListItem*,bool&)) );
+ connect(readMail, SIGNAL(viewingMail(Email*)), emailClient,
+ SLOT(moveMailFront(Email*)) );
- connect(emailClient, SIGNAL(newCaption(const QString &)),
- this, SLOT(updateCaption(const QString &)) );
+ connect(emailClient, SIGNAL(newCaption(const QString&)),
+ this, SLOT(updateCaption(const QString&)) );
- connect(readMail, SIGNAL(download(Email *)), emailClient, SLOT(download(Email*)) );
+ connect(readMail, SIGNAL(download(Email*)), emailClient, SLOT(download(Email*)) );
viewingMail = FALSE;
}
MailItWindow::~MailItWindow()
{
}
void MailItWindow::closeEvent(QCloseEvent *e)
{
if (views->visibleWidget() == emailClient) {
e->accept();
} else {
showEmailClient();
}
}
void MailItWindow::compose()
{
viewingMail = FALSE;
emailClient->hide();
readMail->hide();
views->raiseWidget(writeMail);
writeMail->setAddressList(emailClient->getAdrListRef());
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index a09bc30..7f1c0b8 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -155,70 +155,70 @@ void MainWindow::makeMenu()
label = new QLabel( " / ", sectionBar );
label->font().setPointSize( 8 );
// label->setBackgroundMode( PaletteForeground );
subsection = new QComboBox( false, sectionBar );
subsection->font().setPointSize( 8 );
a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) );
a->addTo( sectionBar );
setSections();
setSubSections();
sectionAction = new QAction( tr( "Sections" ), QString::null, 0, this, 0 );
connect( sectionAction, SIGNAL( toggled(bool) ), this, SLOT( sectionShow(bool) ) );
sectionAction->setToggleAction( true );
sectionAction->addTo( viewMenu );
// sectionBar->setStretchableWidget( section );
//FIND
findBar = new QToolBar(this);
addToolBar( findBar, "Filter", QMainWindow::Top, TRUE );
label = new QLabel( tr("Filter: "), findBar );
// label->setBackgroundMode( PaletteForeground );
findBar->setHorizontalStretchable( TRUE );
findEdit = new QLineEdit( findBar, "findEdit" );
findBar->setStretchableWidget( findEdit );
- connect( findEdit, SIGNAL( textChanged( const QString & ) ),
+ connect( findEdit, SIGNAL( textChanged(const QString&) ),
this, SLOT( displayList() ) );
a = new QAction( tr( "Clear Find" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), findEdit, SLOT( clear() ) );
a->addTo( findBar );
a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) );
a->addTo( findBar );
findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 );
connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) );
findAction->setToggleAction( true );
findAction->addTo( viewMenu );
//SEARCH
searchBar = new QToolBar(this);
addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
label = new QLabel( tr("Search: "), searchBar );
// label->setBackgroundMode( PaletteForeground );
searchBar->setHorizontalStretchable( TRUE );
searchEdit = new QLineEdit( searchBar, "seachEdit" );
searchBar->setStretchableWidget( searchEdit );
-// connect( searchEdit, SIGNAL( textChanged( const QString & ) ),
+// connect( searchEdit, SIGNAL( textChanged(const QString&) ),
// this, SLOT( displayList() ) );
a = new QAction( tr( "Clear Search" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), searchEdit, SLOT( clear() ) );
a->addTo( searchBar );
searchCommit = new QAction( tr( "Do Search" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 );
connect( searchCommit, SIGNAL( activated() ), SLOT( remotePackageQuery() ) );
searchCommit->addTo( searchBar );
a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( searchClose() ) );
a->addTo( searchBar );
searchAction = new QAction( tr( "Search" ), QString::null, 0, this, 0 );
connect( searchAction, SIGNAL( toggled(bool) ), this, SLOT( searchShow(bool) ) );
searchAction->setToggleAction( true );
searchAction->addTo( viewMenu );
//DEST
destBar = new QToolBar(this);
addToolBar( destBar, "Destination", QMainWindow::Top, TRUE );
label = new QLabel( tr("Destination: "), destBar );
// label->setBackgroundMode( PaletteForeground );
destBar->setHorizontalStretchable( TRUE );
destination = new QComboBox( false, destBar );
destination->insertStringList( settings->getDestinationNames() );
setComboName(destination,settings->getDestinationName());
@@ -447,50 +447,50 @@ void MainWindow::destShow(bool b)
{
if (b) destBar->show();
else destBar->hide();
destAction->setOn( b );
}
void MainWindow::destClose()
{
destAction->setOn( false );
}
void MainWindow::setDocument(const QString &fileName)
{
if ( !QFile::exists( fileName ) ) return;
ipkg->installFile( fileName );
QCopEnvelope e("QPE/System", "linkChanged(QString)");
QString lf = QString::null;
e << lf;
}
void MainWindow::makeChannel()
{
channel = new QCopChannel( "QPE/Application/oipkg", this );
- connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
- this, SLOT(receive(const QCString&, const QByteArray&)) );
+ connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
+ this, SLOT(receive(const QCString&,const QByteArray&)) );
}
void MainWindow::receive(const QCString &msg, const QByteArray &arg)
{
pvDebug(3, "QCop "+msg+" "+QCString(arg));
if ( msg == "installFile(QString)" )
{
ipkg->installFile( QString(arg) );
}else if( msg == "removeFile(QString)" )
{
ipkg->removeFile( QString(arg) );
}else if( msg == "createLinks(QString)" )
{
ipkg->createLinks( QString(arg) );
}else if( msg == "removeLinks(QString)" )
{
ipkg->removeLinks( QString(arg) );
}else{
pvDebug(2,"Huh what do ya want")
}
}
diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp
index 1610a37..1b4812d 100644
--- a/noncore/unsupported/oipkg/packagelistitem.cpp
+++ b/noncore/unsupported/oipkg/packagelistitem.cpp
@@ -190,51 +190,51 @@ void PackageListItem::displayDetails()
}
QPopupMenu* PackageListItem::getPopupMenu()
{
popupMenu->clear();
destsMenu->clear();
QAction *popupAction;
qDebug("PackageListItem::showPopup ");
if (!package->installed()){
popupMenu->insertItem( QObject::tr("Install to"), destsMenu );
QStringList dests = settings->getDestinationNames();
QString ad = settings->getDestinationName();
for (uint i = 0; i < dests.count(); i++ )
{
popupAction = new QAction( dests[i], QString::null, 0, popupMenu, 0 );
popupAction->addTo( destsMenu );
if ( dests[i] == ad && getPackage()->toInstall() )
{
popupAction->setToggleAction( true );
popupAction->setOn(true);
}
}
- connect( destsMenu, SIGNAL( activated( int ) ),
- this, SLOT( menuAction( int ) ) );
+ connect( destsMenu, SIGNAL( activated(int) ),
+ this, SLOT( menuAction(int) ) );
popupMenu->popup( QCursor::pos() );
}else{
popupMenu->insertItem( QObject::tr("Remove"));
- connect( popupMenu, SIGNAL( activated( int ) ),
- this, SLOT( menuAction( int ) ) );
+ connect( popupMenu, SIGNAL( activated(int) ),
+ this, SLOT( menuAction(int) ) );
popupMenu->popup( QCursor::pos() );
}
return popupMenu;
}
void PackageListItem::menuAction( int i )
{
if (!package->installed()){
package->setDest( destsMenu->text(i) );
package->setLink( settings->createLinks() );
}
package->setOn();
displayDetails();
}
//void PackageListItem::toggleProcess()
//{
// package->toggleProcess() ;
// displayDetails();
//}
diff --git a/noncore/unsupported/oipkg/packagelistview.cpp b/noncore/unsupported/oipkg/packagelistview.cpp
index 3c7435d..98ebf88 100644
--- a/noncore/unsupported/oipkg/packagelistview.cpp
+++ b/noncore/unsupported/oipkg/packagelistview.cpp
@@ -6,52 +6,52 @@
* (at your option) any later version. *
* *
***************************************************************************/
// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
#include "packagelistview.h"
#include <qpopupmenu.h>
#include <qaction.h>
#include "listviewitemoipkg.h"
#include "packagelistitem.h"
#include "pksettings.h"
PackageListView::PackageListView(QWidget *p, const char* n, PackageManagerSettings *s)
: QListView(p,n)
{
settings = s;
popupTimer = new QTimer( this );
setSelectionMode(QListView::NoSelection);
addColumn( tr("Package") );
setRootIsDecorated( true );
connect( popupTimer, SIGNAL(timeout()),
this, SLOT(showPopup()) );
- connect( this, SIGNAL( pressed( QListViewItem* ) ),
- this, SLOT( setCurrent( QListViewItem* ) ) );
- connect( this, SIGNAL( clicked( QListViewItem* ) ),
- this, SLOT( stopTimer( QListViewItem* ) ) );
+ connect( this, SIGNAL( pressed(QListViewItem*) ),
+ this, SLOT( setCurrent(QListViewItem*) ) );
+ connect( this, SIGNAL( clicked(QListViewItem*) ),
+ this, SLOT( stopTimer(QListViewItem*) ) );
}
//PackageListView::~PackageListView()
//{
//}
void PackageListView::setCurrent( QListViewItem* p )
{
qDebug("PackageListView::setCurrent ");
activeItem = (ListViewItemOipkg*)p;
if ( activeItem != 0 ) popupTimer->start( 750, true );
// if ( activeItem->getType() != ListViewItemOipkg::Package ){
// qDebug("PackageListView::setCurrent !p ");
// activePackage = 0;
// activePackageListItem = 0;
// qDebug("PackageListView::setCurrent returning ");
// return;
// };
// activePackageListItem = (PackageListItem*)p;
// activePackage = activePackageListItem->getPackage();
// if (activePackage == 0 )
diff --git a/noncore/unsupported/oipkg/pksettings.cpp b/noncore/unsupported/oipkg/pksettings.cpp
index 063b018..aac011e 100644
--- a/noncore/unsupported/oipkg/pksettings.cpp
+++ b/noncore/unsupported/oipkg/pksettings.cpp
@@ -25,49 +25,49 @@
#include <qobject.h>
#include <qtextstream.h>
#include <qtextview.h>
#include <qtoolbutton.h>
#include <qtabwidget.h>
#include <stdlib.h>
#include <unistd.h>
#include "debug.h"
//#include "utils.h"
PackageManagerSettings::PackageManagerSettings( QWidget* parent, const char* name, WFlags fl )
: PackageManagerSettingsBase( parent, name, fl )
{
connect( newserver, SIGNAL(clicked()), this, SLOT(newServer()) );
connect( removeserver, SIGNAL(clicked()), this, SLOT(removeServer()) );
connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
connect( newdestination, SIGNAL(clicked()), this, SLOT(newDestination()) );
connect( removedestination, SIGNAL(clicked()), this, SLOT(removeDestination()) );
connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) );
// connect( CheckBoxLink, SIGNAL(toggled(bool)),
// activeLinkDestination, SLOT(setEnabled(bool)) );
// connect( settingName, SIGNAL(activated(int)), this, SLOT(installationSettingChange(int)) );
-// connect( settingName, SIGNAL(textChanged(const QString &)), this, SLOT(installationSettingSetName(const QString &)) );
+// connect( settingName, SIGNAL(textChanged(const QString&)), this, SLOT(installationSettingSetName(const QString&)) );
// connect( newsetting, SIGNAL(clicked()), this, SLOT(newInstallationSetting()) );
// connect( renamesetting, SIGNAL(clicked()), this, SLOT(renameInstallationSetting()) );
// connect( removesetting, SIGNAL(clicked()), this, SLOT(removeInstallationSetting()) );
servername->setEnabled(FALSE);
serverurl->setEnabled(FALSE);
serverurlDic.setAutoDelete(TRUE);
destinationname->setEnabled(FALSE);
destinationurl->setEnabled(FALSE);
destinationurlDic.setAutoDelete(TRUE);
readSettings();
activeLinkDestination->hide();
serverChanged = false;
// get rid of setups
// Settings->hide();
// settingName->hide();
// newsetting->hide();
// renamesetting->hide();
// removesetting->hide();
}
PackageManagerSettings::~PackageManagerSettings()
{
}
diff --git a/noncore/unsupported/qpdf/qbusybar.cpp b/noncore/unsupported/qpdf/qbusybar.cpp
index ce7ab8e..e942f06 100644
--- a/noncore/unsupported/qpdf/qbusybar.cpp
+++ b/noncore/unsupported/qpdf/qbusybar.cpp
@@ -1,44 +1,44 @@
#include <qapplication.h>
#include <qtimer.h>
#include <qpainter.h>
#include "qbusybar.h"
QBusyBar::QBusyBar ( QWidget *parent, const char *name, int flags ) : QWidget ( parent, name, flags | WRepaintNoErase )
{
m_busy = 0;
m_div = 0;
m_pos = 0;
m_fade = 0;
m_fadecols = 0;
m_speed = 500;
m_timer = new QTimer ( this );
- connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( slotTimeout ( )));
+ connect ( m_timer, SIGNAL( timeout()), this, SLOT( slotTimeout()));
setParameters ( 12, 8, 200 );
}
void QBusyBar::setParameters ( int d, int s, int v )
{
bool running = m_timer-> isActive ( );
if ( running )
m_timer-> stop ( );
m_div = d;
m_speed = v;
delete [] m_fadecols;
m_fade = s;
m_fadecols = new QColor [m_fade];
int rt, gt, bt;
int rf, gf, bf;
colorGroup ( ). color ( QColorGroup::Highlight ). rgb ( &rf, &gf, &bf );
colorGroup ( ). color ( QColorGroup::Background ). rgb ( &rt, &gt, &bt );
diff --git a/noncore/unsupported/qpdf/qpdf.cpp b/noncore/unsupported/qpdf/qpdf.cpp
index 5cdcccf..75e86d0 100644
--- a/noncore/unsupported/qpdf/qpdf.cpp
+++ b/noncore/unsupported/qpdf/qpdf.cpp
@@ -64,107 +64,107 @@ int main ( int argc, char **argv )
QPdfDlg::QPdfDlg ( ) : QMainWindow ( )
{
setCaption ( tr( "QPdf" ));
setIcon ( Resource::loadPixmap ( "qpdf_icon" ));
m_busy = false;
m_doc = 0;
m_pages = 0;
m_zoom = 72;
m_currentpage = 0;
m_fullscreen = false;
m_renderok = false;
setToolBarsMovable ( false );
m_stack = new QWidgetStack ( this );
m_stack-> setSizePolicy ( QSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding ));
setCentralWidget ( m_stack );
m_outdev = new QPEOutputDev ( m_stack );
- connect ( m_outdev, SIGNAL( selectionChanged ( const QRect & )), this, SLOT( copyToClipboard ( const QRect & )));
+ connect ( m_outdev, SIGNAL( selectionChanged(const QRect&)), this, SLOT( copyToClipboard(const QRect&)));
#ifdef QPDF_QPE_ONLY
m_filesel = new FileSelector ( "application/pdf", m_stack, "fs", false, true );
#else
m_filesel = new OFileSelector ( "application/pdf", m_stack, "fs", false, true );
#endif
- connect ( m_filesel, SIGNAL( closeMe ( )), this, SLOT( closeFileSelector ( )));
- connect ( m_filesel, SIGNAL( fileSelected ( const DocLnk & )), this, SLOT( openFile ( const DocLnk & )));
+ connect ( m_filesel, SIGNAL( closeMe()), this, SLOT( closeFileSelector()));
+ connect ( m_filesel, SIGNAL( fileSelected(const DocLnk&)), this, SLOT( openFile(const DocLnk&)));
m_tb_menu = new QToolBar ( this );
m_tb_menu-> setHorizontalStretchable ( true );
QMenuBar *mb = new QMenuBar ( m_tb_menu );
m_pm_zoom = new QPopupMenu ( mb );
m_pm_zoom-> setCheckable ( true );
mb-> insertItem ( tr( "Zoom" ), m_pm_zoom );
m_pm_zoom-> insertItem ( tr( "Fit to width" ), 1 );
m_pm_zoom-> insertItem ( tr( "Fit to page" ), 2 );
m_pm_zoom-> insertSeparator ( );
m_pm_zoom-> insertItem ( tr( "50%" ), 50 );
m_pm_zoom-> insertItem ( tr( "75%" ), 75 );
m_pm_zoom-> insertItem ( tr( "100%" ), 100 );
m_pm_zoom-> insertItem ( tr( "125%" ), 125 );
m_pm_zoom-> insertItem ( tr( "150%" ), 150 );
m_pm_zoom-> insertItem ( tr( "200%" ), 200 );
- connect ( m_pm_zoom, SIGNAL( activated ( int )), this, SLOT( setZoom ( int )));
+ connect ( m_pm_zoom, SIGNAL( activated(int)), this, SLOT( setZoom(int)));
m_tb_tool = new QToolBar ( this );
- new QToolButton ( Resource::loadIconSet ( "fileopen" ), tr( "Open..." ), QString::null, this, SLOT( openFile ( )), m_tb_tool, "open" );
+ new QToolButton ( Resource::loadIconSet ( "fileopen" ), tr( "Open..." ), QString::null, this, SLOT( openFile()), m_tb_tool, "open" );
m_tb_tool-> addSeparator ( );
- m_to_find = new QToolButton ( Resource::loadIconSet ( "find" ), tr( "Find..." ), QString::null, this, SLOT( toggleFindBar ( )), m_tb_tool, "find" );
+ m_to_find = new QToolButton ( Resource::loadIconSet ( "find" ), tr( "Find..." ), QString::null, this, SLOT( toggleFindBar()), m_tb_tool, "find" );
m_to_find-> setToggleButton ( true );
m_tb_tool-> addSeparator ( );
- m_to_full = new QToolButton ( Resource::loadIconSet ( "fullscreen" ), tr( "Fullscreen" ), QString::null, this, SLOT( toggleFullscreen ( )), m_tb_tool, "fullscreen" );
+ m_to_full = new QToolButton ( Resource::loadIconSet ( "fullscreen" ), tr( "Fullscreen" ), QString::null, this, SLOT( toggleFullscreen()), m_tb_tool, "fullscreen" );
m_to_full-> setToggleButton ( true );
m_tb_tool-> addSeparator ( );
- new QToolButton ( Resource::loadIconSet ( "fastback" ), tr( "First page" ), QString::null, this, SLOT( firstPage ( )), m_tb_tool, "first" );
- new QToolButton ( Resource::loadIconSet ( "back" ), tr( "Previous page" ), QString::null, this, SLOT( prevPage ( )), m_tb_tool, "prev" );
- new QToolButton ( Resource::loadIconSet ( "down" ), tr( "Goto page..." ), QString::null, this, SLOT( gotoPageDialog ( )), m_tb_tool, "goto" );
- new QToolButton ( Resource::loadIconSet ( "forward" ), tr( "Next page" ), QString::null, this, SLOT( nextPage ( )), m_tb_tool, "next" );
- new QToolButton ( Resource::loadIconSet ( "fastforward" ), tr( "Last page" ), QString::null, this, SLOT( lastPage ( )), m_tb_tool, "last" );
+ new QToolButton ( Resource::loadIconSet ( "fastback" ), tr( "First page" ), QString::null, this, SLOT( firstPage()), m_tb_tool, "first" );
+ new QToolButton ( Resource::loadIconSet ( "back" ), tr( "Previous page" ), QString::null, this, SLOT( prevPage()), m_tb_tool, "prev" );
+ new QToolButton ( Resource::loadIconSet ( "down" ), tr( "Goto page..." ), QString::null, this, SLOT( gotoPageDialog()), m_tb_tool, "goto" );
+ new QToolButton ( Resource::loadIconSet ( "forward" ), tr( "Next page" ), QString::null, this, SLOT( nextPage()), m_tb_tool, "next" );
+ new QToolButton ( Resource::loadIconSet ( "fastforward" ), tr( "Last page" ), QString::null, this, SLOT( lastPage()), m_tb_tool, "last" );
m_tb_find = new QToolBar ( this );
addToolBar ( m_tb_find, "Search", QMainWindow::Top, true );
m_tb_find-> setHorizontalStretchable ( true );
m_tb_find-> hide ( );
m_findedit = new QLineEdit ( m_tb_find, "findedit" );
m_tb_find-> setStretchableWidget ( m_findedit );
- connect ( m_findedit, SIGNAL( textChanged ( const QString & )), this, SLOT( findText ( const QString & )));
+ connect ( m_findedit, SIGNAL( textChanged(const QString&)), this, SLOT( findText(const QString&)));
- new QToolButton ( Resource::loadIconSet ( "next" ), tr( "Next" ), QString::null, this, SLOT( findText ( )), m_tb_find, "findnext" );
+ new QToolButton ( Resource::loadIconSet ( "next" ), tr( "Next" ), QString::null, this, SLOT( findText()), m_tb_find, "findnext" );
openFile ( );
}
QPdfDlg::~QPdfDlg ( )
{
delete m_doc;
}
// vv Fullscreen handling (for broken QT-lib) [David Hedbor, www.eongames.com]
void QPdfDlg::resizeEvent ( QResizeEvent * )
{
if ( m_fullscreen && ( size ( ) != qApp-> desktop ( )-> size ( )))
setFullscreen ( true );
}
void QPdfDlg::focusInEvent ( QFocusEvent * )
{
if ( m_fullscreen )
setFullscreen ( true );
}
void QPdfDlg::toggleFullscreen ( )
@@ -474,49 +474,49 @@ void QPdfDlg::openFile ( const QString &f )
QFileInfo fi ( f );
nf. setName ( fi. baseName ( ));
openFile ( nf );
}
void QPdfDlg::openFile ( const DocLnk &f )
{
QString fn = f. file ( );
QFileInfo fi ( fn );
if ( fi. exists ( )) {
delete m_doc;
m_doc = new PDFDoc ( new GString ( fn. local8Bit ( )), 0, 0 );
if ( m_doc-> isOk ( )) {
m_currentdoc = f. name ( );
int sep = m_currentdoc. findRev ( '/' );
if ( sep > 0 )
m_currentdoc = m_currentdoc. mid ( sep + 1 );
m_pages = m_doc-> getNumPages ( );
m_currentpage = 0;
- QTimer::singleShot ( 0, this, SLOT( delayedInit ( )));
+ QTimer::singleShot ( 0, this, SLOT( delayedInit()));
}
else {
delete m_doc;
m_doc = 0;
m_currentdoc = QString::null;
}
updateCaption ( );
}
else
QMessageBox::warning ( this, tr( "Error" ), tr( "File does not exist!" ));
}
void QPdfDlg::setDocument ( const QString &f )
{
if ( f. find ( ".desktop", 0, true ) == -1 )
openFile ( f );
else
openFile ( DocLnk ( f ));
closeFileSelector ( );
}