MailMessageClient::MailMessageClient(QObject* parent) : QObject(parent), adaptor(new QtopiaIpcAdaptor("QPE/QMailMessageServer", this)) { QtopiaIpcAdaptor::connect(this, SIGNAL(statusChanged(QMailMessageServer::Operation,QString,QString)), adaptor, MESSAGE(statusChanged(QMailMessageServer::Operation, QString, QString))); QtopiaIpcAdaptor::connect(this, SIGNAL(retrievalTotal(uint)), adaptor, MESSAGE(retrievalTotal(uint))); QtopiaIpcAdaptor::connect(this, SIGNAL(retrievalProgress(uint)), adaptor, MESSAGE(retrievalProgress(uint))); QtopiaIpcAdaptor::connect(this, SIGNAL(sendTotal(uint)), adaptor, MESSAGE(sendTotal(uint))); QtopiaIpcAdaptor::connect(this, SIGNAL(sendProgress(uint)), adaptor, MESSAGE(sendProgress(uint))); QtopiaIpcAdaptor::connect(this, SIGNAL(sendCompleted()), adaptor, MESSAGE(sendCompleted())); QtopiaIpcAdaptor::connect(this, SIGNAL(messageSent(QMailMessageId)), adaptor, MESSAGE(messageSent(QMailMessageId))); QtopiaIpcAdaptor::connect(this, SIGNAL(errorOccurred(QMailAccountId,QString,int)), adaptor, MESSAGE(errorOccurred(QMailAccountId, QString, int))); QtopiaIpcAdaptor::connect(this, SIGNAL(newCountChanged(QMailMessageCountMap)), adaptor, MESSAGE(newCountChanged(QMailMessageCountMap))); QtopiaIpcAdaptor::connect(this, SIGNAL(partialMessageRetrieved(QMailMessageMetaData)), adaptor, MESSAGE(partialMessageRetrieved(QMailMessageMetaData))); QtopiaIpcAdaptor::connect(this, SIGNAL(messageRetrieved(QMailMessageMetaData)), adaptor, MESSAGE(messageRetrieved(QMailMessageMetaData))); QtopiaIpcAdaptor::connect(this, SIGNAL(partialRetrievalCompleted()), adaptor, MESSAGE(partialRetrievalCompleted())); QtopiaIpcAdaptor::connect(this, SIGNAL(retrievalCompleted()), adaptor, MESSAGE(retrievalCompleted())); QtopiaIpcAdaptor::connect(this, SIGNAL(searchTotal(uint)), adaptor, MESSAGE(searchTotal(uint))); QtopiaIpcAdaptor::connect(this, SIGNAL(searchProgress(uint)), adaptor, MESSAGE(searchProgress(uint))); QtopiaIpcAdaptor::connect(this, SIGNAL(matchingMessageIds(QMailMessageIdList)), adaptor, MESSAGE(matchingMessageIds(QMailMessageIdList))); QtopiaIpcAdaptor::connect(this, SIGNAL(searchCompleted()), adaptor, MESSAGE(searchCompleted())); QtopiaIpcAdaptor::connect(adaptor, MESSAGE(cancelSearch()), this, SIGNAL(cancelSearch())); QtopiaIpcAdaptor::connect(adaptor, MESSAGE(send(QMailMessageIdList)), this, SIGNAL(send(QMailMessageIdList))); QtopiaIpcAdaptor::connect(adaptor, MESSAGE(retrieve(QMailAccountId, bool)), this, SIGNAL(retrieve(QMailAccountId, bool))); QtopiaIpcAdaptor::connect(adaptor, MESSAGE(completeRetrieval(QMailMessageIdList)), this, SIGNAL(completeRetrieval(QMailMessageIdList))); QtopiaIpcAdaptor::connect(adaptor, MESSAGE(cancelTransfer()), this, SIGNAL(cancelTransfer())); QtopiaIpcAdaptor::connect(adaptor, MESSAGE(acknowledgeNewMessages(QMailMessageTypeList)), this, SIGNAL(acknowledgeNewMessages(QMailMessageTypeList))); QtopiaIpcAdaptor::connect(adaptor, MESSAGE(searchMessages(QMailMessageKey, QString)), this, SIGNAL(searchMessages(QMailMessageKey, QString))); }
void V4LRadioControl::searchBackward() { // Scan down if(scanning) { cancelSearch(); return; } scanning = true; forward = false; timer->start(); }
void V4LRadioControl::searchForward() { // Scan up if(scanning) { cancelSearch(); return; } scanning = true; forward = true; timer->start(); }
void BorrowerSearch::setupActions() { connect(searchBorrowersButton, SIGNAL(clicked()), this, SLOT(searchBorrowers())); connect(nameLast, SIGNAL(returnPressed()), this, SLOT(searchBorrowers())); connect(nameFirst, SIGNAL(returnPressed()), this, SLOT(searchBorrowers())); connect(pushButtonOK, SIGNAL(clicked()), this, SLOT(acceptBorrower())); connect(resultsTable, SIGNAL(itemDoubleClicked(QTableWidgetItem *)), this, SLOT(acceptBorrower())); connect(pushButtonCancel, SIGNAL(clicked()), this, SLOT(cancelSearch())); }
void V4LRadioControl::search() { int signal = signalStrength(); if(sig != signal) { sig = signal; emit signalStrengthChanged(sig); } if(!scanning) return; if (signal > 25) { cancelSearch(); return; } if(forward) { setFrequency(currentFreq+step); } else { setFrequency(currentFreq-step); } }
void SearchPkcs11::on_search_clicked() { if (searching) { return; } searching = new searchThread(filename->text(), getLibExtensions(), subdirs->isChecked()); liblist->clear(); connect(searching, SIGNAL(updateLibs(QString)), this, SLOT(updateLibs(QString))); connect(searching, SIGNAL(updateCurrFile(QString)), this, SLOT(updateCurrFile(QString))); connect(searching, SIGNAL(finished()), this, SLOT(finishSearch())); connect(search, SIGNAL(clicked()), searching, SLOT(cancelSearch())); search->setText("Cancel"); searching->start(); }
TreeArea::TreeArea(QWidget *parent): QWidget(parent) { this->setMinimumWidth(250); this->setMaximumWidth(250); // sorts Tree this->sortsTree = new QTreeWidget(this); this->sortsTree->setContextMenuPolicy(Qt::CustomContextMenu); this->sortsTree->setHeaderLabel("Sorts"); this->sortsTree->setSelectionMode(QAbstractItemView::MultiSelection); QPalette p = this->sortsTree->palette(); p.setColor(QPalette::Base, QColor(207, 226, 243)); this->sortsTree->setPalette(p); // search field QWidget *search = new QWidget(this); search->setMinimumWidth(250); search->setMaximumWidth(250); search->setMinimumHeight(50); search->setMaximumHeight(50); this->searchBox = new QLineEdit(search); this->searchBox->setAlignment(Qt::AlignLeft); this->searchBox->setMinimumWidth(125); this->searchBox->setMaximumWidth(125); this->searchBox->setMinimumHeight(30); this->searchBox->setMaximumHeight(30); this->searchButton = new QPushButton("Search", search); this->searchButton->setMinimumWidth(60); this->searchButton->setMaximumWidth(60); this->searchButton->setMinimumHeight(30); this->searchButton->setMaximumHeight(30); this->cancelSearchButton = new QPushButton("X", search); this->cancelSearchButton->setMinimumWidth(20); this->cancelSearchButton->setMaximumWidth(20); this->cancelSearchButton->setMinimumHeight(30); this->cancelSearchButton->setMaximumHeight(30); QHBoxLayout *layoutsearch = new QHBoxLayout; layoutsearch->addWidget(this->searchBox); layoutsearch->addWidget(this->searchButton); layoutsearch->addWidget(this->cancelSearchButton); search->setLayout(layoutsearch); // widget containing the button to add a sort to a group QWidget *sortsToGroup = new QWidget(this); sortsToGroup->setMinimumWidth(250); sortsToGroup->setMaximumWidth(250); sortsToGroup->setMinimumHeight(50); sortsToGroup->setMaximumHeight(50); this->addToGroupButton = new QPushButton("Add to", sortsToGroup); this->addToGroupButton->setMinimumWidth(220); this->addToGroupButton->setMaximumWidth(220); this->addToGroupButton->setMinimumHeight(30); this->addToGroupButton->setMaximumHeight(30); QHBoxLayout *layoutSortsToGroup = new QHBoxLayout; layoutSortsToGroup->addWidget(this->addToGroupButton); sortsToGroup->setLayout(layoutSortsToGroup); QWidget *group = new QWidget(this); group->setMinimumWidth(250); group->setMaximumWidth(250); group->setMinimumHeight(50); group->setMaximumHeight(50); this->addGroupButton = new QPushButton("Add group", group); this->addGroupButton->setMinimumWidth(100); this->addGroupButton->setMaximumWidth(100); this->addGroupButton->setMinimumHeight(30); this->addGroupButton->setMaximumHeight(30); this->removeGroupButton = new QPushButton("Remove", group); this->removeGroupButton->setMinimumWidth(110); this->removeGroupButton->setMaximumWidth(110); this->removeGroupButton->setMinimumHeight(30); this->removeGroupButton->setMaximumHeight(30); QHBoxLayout *layoutGroup = new QHBoxLayout; layoutGroup->addWidget(this->addGroupButton); layoutGroup->addWidget(this->removeGroupButton); group->setLayout(layoutGroup); // groups Tree this->groupsTree = new QTreeWidget(this); this->groupsTree->setContextMenuPolicy(Qt::CustomContextMenu); this->groupsTree->setHeaderLabel("Groups"); this->groupsTree->setSelectionMode(QAbstractItemView::SingleSelection); QPalette f = this->groupsTree->palette(); f.setColor(QPalette::Base, QColor(207, 226, 243)); this->groupsTree->setPalette(f); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(search); layout->addWidget(this->sortsTree); layout->addWidget(sortsToGroup); layout->addWidget(this->groupsTree); layout->addWidget(group); this->setLayout(layout); // palette of the groups tree this->palette = new QList<QColor>(); this->palette->push_back(Qt::red); this->palette->push_back(Qt::yellow); this->palette->push_back(Qt::blue); this->palette->push_back(Qt::green); this->palette->push_back(Qt::cyan); this->palette->push_back(Qt::magenta); this->palette->push_back(Qt::gray); this->palette->push_back(Qt::darkRed); this->groupsPalette = new QMap<QTreeWidgetItem*, QColor>(); // connect QObject::connect(this->searchButton, SIGNAL(clicked()), this, SLOT(searchSort())); QObject::connect(this->cancelSearchButton, SIGNAL(clicked()), this, SLOT(cancelSearch())); QObject::connect(this->addGroupButton, SIGNAL(clicked()), this, SLOT(addGroup())); QObject::connect(this->removeGroupButton, SIGNAL(clicked()), this, SLOT(remove())); QObject::connect(this->addToGroupButton, SIGNAL(clicked()), this, SLOT(addToGroup())); QObject::connect(this->sortsTree, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(sortsItemClicked(const QPoint&))); QObject::connect(this->groupsTree, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(groupsItemClicked(const QPoint&))); }