summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-25 11:29:28 (UTC)
committer zautrix <zautrix>2005-02-25 11:29:28 (UTC)
commitff810f8f74f6928e664bf52f8e8d128edb8ac5ad (patch) (side-by-side diff)
treed5473801c69b42d90879104fc4d05a5ad9b69e87 /korganizer
parentff8a2f593fae5ffe82f889ab70d32bf02a45f4fb (diff)
downloadkdepimpi-ff810f8f74f6928e664bf52f8e8d128edb8ac5ad.zip
kdepimpi-ff810f8f74f6928e664bf52f8e8d128edb8ac5ad.tar.gz
kdepimpi-ff810f8f74f6928e664bf52f8e8d128edb8ac5ad.tar.bz2
many small fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeventviewerdialog.cpp6
-rw-r--r--korganizer/kolistview.cpp2
-rw-r--r--korganizer/searchdialog.cpp9
-rw-r--r--korganizer/searchdialog.h4
4 files changed, 18 insertions, 3 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index e2c8e6e..f606124 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -253,30 +253,36 @@ void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e )
switch ( e->key() ) {
case Qt::Key_A :
case Qt::Key_L :
showIncidence();
break;
case Qt::Key_E :
case Qt::Key_R :
editIncidence();
break;
case Qt::Key_C:
case Qt::Key_Escape:
+ sendSignalViewerClosed = true;
close();
break;
case Qt::Key_I:
+#ifndef DESKTOP_VERSION
+ sendSignalViewerClosed = true;
+ close();
+#else
sendSignalViewerClosed = true;
slotViewerClosed();
//accept();
+#endif
break;
default:
KDialogBase::keyPressEvent ( e );
break;
}
}
void KOEventViewerDialog::hideEvent ( QHideEvent * e )
{
KDialogBase::hideEvent ( e );
QTimer::singleShot( 1, this, SLOT (slotViewerClosed() ) );
}
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 6acee75..710a9f9 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -1074,26 +1074,26 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
break;
case Qt::Key_I: {
QListViewItem* cn;
cn = currentItem();
if ( cn ) {
KOListViewItem* ci = (KOListViewItem*)( cn );
if ( ci ){
//emit showIncidence( ci->data());
cn = cn->nextSibling();
if ( cn ) {
setCurrentItem ( cn );
ensureItemVisible ( cn );
- emit showIncidence( ci->data());
}
+ emit showIncidence( ci->data());
}
}
e->accept();
}
break;
case Qt::Key_Return:
case Qt::Key_Enter:
{
QListViewItem* cn;
cn = currentItem();
if ( cn ) {
KOListViewItem* ci = (KOListViewItem*)( cn );
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index cef59a2..678e1bd 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -17,56 +17,58 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qlayout.h>
#include <qcheckbox.h>
#include <qgroupbox.h>
#include <qlabel.h>
+#include <qlistview.h>
#include <qwhatsthis.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <libkdepim/kdateedit.h>
#include "koglobals.h"
#include "koprefs.h"
+#include "klineedit.h"
#include "calendarview.h"
#include "koviewmanager.h"
#include "searchdialog.h"
SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
: QVBox( 0 )
{
mCalendar = calendar;
QFrame *topFrame = new QFrame( this ) ;//plainPage();
QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint());
// Search expression
QHBoxLayout *subLayout = new QHBoxLayout();
layout->addLayout(subLayout);
searchLabel = new QLabel(topFrame);
searchLabel->setText(i18n("Search for:"));
subLayout->addWidget(searchLabel);
- searchEdit = new QLineEdit(topFrame);
+ searchEdit = new KLineEdit(topFrame);
subLayout->addWidget(searchEdit);
QPushButton *OkButton = new QPushButton( i18n("&Find"), topFrame );
//OkButton->setDefault( true );
connect(OkButton,SIGNAL(clicked()),SLOT(doSearch()));
subLayout->addWidget(OkButton);
searchEdit->setText("*"); // Find all events by default
searchEdit->setFocus();
connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & )));
connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch()));
// Subjects to search
// QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"),
// topFrame);
@@ -105,36 +107,41 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget));
mEndDate = new KDateEdit(rangeWidget);
mEndDate->setDate(QDate::currentDate().addDays(365));
rangeLayout->addWidget(mEndDate);
QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget );
rangeLayout->addWidget( (QWidget*)wt );
layout->addWidget(rangeWidget);
// Results list view
listView = new KOListView(mCalendar,topFrame);
layout->addWidget(listView);
listView->readSettings(KOGlobals::config(),"SearchListView Layout");
+ connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList()));
setCaption( i18n("KO/Pi Find: "));
#ifdef DESKTOP_VERSION
OkButton = new QPushButton( i18n("Close"), this );
connect(OkButton,SIGNAL(clicked()),SLOT(hide()));
#endif
}
SearchDialog::~SearchDialog()
{
}
+void SearchDialog::setFocusToList()
+{
+ listView->resetFocus();
+}
void SearchDialog::accept()
{
doSearch();
}
void SearchDialog::updateList()
{
//listView->updateList();
if ( isVisible() ) {
updateView();
//qDebug("SearchDialog::updated ");
}
else {
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index f4aad9e..b730ed5 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -27,62 +27,64 @@
#include <qregexp.h>
#include <kdialogbase.h>
#include <qvbox.h>
#include <libkcal/calendar.h>
#include "kolistview.h"
class KDateEdit;
class QCheckBox;
class QLineEdit;
+class KLineEdit;
class QLabel;
class CalendarView;
using namespace KCal;
class SearchDialog : public QVBox
{
Q_OBJECT
public:
SearchDialog(Calendar *calendar,CalendarView *parent=0);
virtual ~SearchDialog();
KOListView *listview(){ return listView;}
void updateView();
public slots:
void changeEventDisplay(Event *, int) { updateView(); }
void updateConfig();
void updateList();
protected slots:
+ void setFocusToList();
void accept();
void doSearch();
void searchTextChanged( const QString &_text );
signals:
void showEventSignal(Event *);
void editEventSignal(Event *);
void deleteEventSignal(Event *);
private:
void search(const QRegExp &);
Calendar *mCalendar;
QPtrList<Event> mMatchedEvents;
QPtrList<Todo> mMatchedTodos;
QPtrList<Journal> mMatchedJournals;
QLabel *searchLabel;
- QLineEdit *searchEdit;
+ KLineEdit *searchEdit;
KOListView *listView;
KDateEdit *mStartDate;
KDateEdit *mEndDate;
QCheckBox *mSummaryCheck;
QCheckBox *mDescriptionCheck;
QCheckBox *mCategoryCheck;
QCheckBox *mSearchEvent;
QCheckBox *mSearchTodo;
QCheckBox *mSearchJournal;
QCheckBox *mSearchAName;
QCheckBox *mSearchAEmail;