author | tille <tille> | 2003-05-16 17:18:23 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-16 17:18:23 (UTC) |
commit | 076926e6c7fe5bfd52f9f42879a216885ccc2cd3 (patch) (unidiff) | |
tree | d78e02996c8e894ea0e28666bd3e59d3e1bfbda8 | |
parent | 11b6ce5ac500dce757ccdd0a5f5b5ecd7fb866c8 (diff) | |
download | opie-076926e6c7fe5bfd52f9f42879a216885ccc2cd3.zip opie-076926e6c7fe5bfd52f9f42879a216885ccc2cd3.tar.gz opie-076926e6c7fe5bfd52f9f42879a216885ccc2cd3.tar.bz2 |
gui stuff
-rw-r--r-- | core/pim/osearch/contactitem.cpp | 2 | ||||
-rw-r--r-- | core/pim/osearch/mainwindow.cpp | 13 | ||||
-rw-r--r-- | core/pim/osearch/opie-osearch.control | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp index ad43ba2..554ab13 100644 --- a/core/pim/osearch/contactitem.cpp +++ b/core/pim/osearch/contactitem.cpp | |||
@@ -60,65 +60,65 @@ void ContactItem::setIcon() | |||
60 | icon = Resource::loadPixmap( "addressbook/webpagehome" ); | 60 | icon = Resource::loadPixmap( "addressbook/webpagehome" ); |
61 | break; | 61 | break; |
62 | case Qtopia::BusinessWebPage: | 62 | case Qtopia::BusinessWebPage: |
63 | icon = Resource::loadPixmap( "addressbook/webpagework" ); | 63 | icon = Resource::loadPixmap( "addressbook/webpagework" ); |
64 | break; | 64 | break; |
65 | case Qtopia::Title: | 65 | case Qtopia::Title: |
66 | case Qtopia::JobTitle: | 66 | case Qtopia::JobTitle: |
67 | case Qtopia::FirstName: | 67 | case Qtopia::FirstName: |
68 | case Qtopia::MiddleName: | 68 | case Qtopia::MiddleName: |
69 | case Qtopia::LastName: | 69 | case Qtopia::LastName: |
70 | case Qtopia::Suffix: | 70 | case Qtopia::Suffix: |
71 | case Qtopia::Nickname: | 71 | case Qtopia::Nickname: |
72 | case Qtopia::FileAs: | 72 | case Qtopia::FileAs: |
73 | icon = Resource::loadPixmap( "osearch/identity" ); | 73 | icon = Resource::loadPixmap( "osearch/identity" ); |
74 | break; | 74 | break; |
75 | case Qtopia::HomeStreet: | 75 | case Qtopia::HomeStreet: |
76 | case Qtopia::HomeCity: | 76 | case Qtopia::HomeCity: |
77 | case Qtopia::HomeState: | 77 | case Qtopia::HomeState: |
78 | case Qtopia::HomeZip: | 78 | case Qtopia::HomeZip: |
79 | case Qtopia::HomeCountry: | 79 | case Qtopia::HomeCountry: |
80 | icon = Resource::loadPixmap( "osearch/addresshome" ); | 80 | icon = Resource::loadPixmap( "osearch/addresshome" ); |
81 | break; | 81 | break; |
82 | case Qtopia::Company: | 82 | case Qtopia::Company: |
83 | case Qtopia::BusinessCity: | 83 | case Qtopia::BusinessCity: |
84 | case Qtopia::BusinessStreet: | 84 | case Qtopia::BusinessStreet: |
85 | case Qtopia::BusinessZip: | 85 | case Qtopia::BusinessZip: |
86 | case Qtopia::BusinessCountry: | 86 | case Qtopia::BusinessCountry: |
87 | case Qtopia::Department: | 87 | case Qtopia::Department: |
88 | case Qtopia::Office: | 88 | case Qtopia::Office: |
89 | case Qtopia::Manager: | 89 | case Qtopia::Manager: |
90 | case Qtopia::BusinessPager: | 90 | case Qtopia::BusinessPager: |
91 | case Qtopia::Profession: | 91 | case Qtopia::Profession: |
92 | icon = Resource::loadPixmap( "addressbook/addresshome" ); | 92 | icon = Resource::loadPixmap( "osearch/addresshome" ); |
93 | break; | 93 | break; |
94 | case Qtopia::Assistant: | 94 | case Qtopia::Assistant: |
95 | case Qtopia::Spouse: | 95 | case Qtopia::Spouse: |
96 | case Qtopia::Children: | 96 | case Qtopia::Children: |
97 | icon = Resource::loadPixmap( "osearch/personal" ); | 97 | icon = Resource::loadPixmap( "osearch/personal" ); |
98 | break; | 98 | break; |
99 | case Qtopia::Birthday: | 99 | case Qtopia::Birthday: |
100 | case Qtopia::Anniversary: | 100 | case Qtopia::Anniversary: |
101 | icon = Resource::loadPixmap( "osearch/clock" ); | 101 | icon = Resource::loadPixmap( "osearch/clock" ); |
102 | break; | 102 | break; |
103 | case Qtopia::Notes: | 103 | case Qtopia::Notes: |
104 | icon = Resource::loadPixmap( "txt" ); | 104 | icon = Resource::loadPixmap( "txt" ); |
105 | break; | 105 | break; |
106 | default: | 106 | default: |
107 | icon = Resource::loadPixmap( "DocsIcon" ); | 107 | icon = Resource::loadPixmap( "DocsIcon" ); |
108 | break; | 108 | break; |
109 | } | 109 | } |
110 | setPixmap( 0, icon ); | 110 | setPixmap( 0, icon ); |
111 | } | 111 | } |
112 | 112 | ||
113 | ContactItem::~ContactItem() | 113 | ContactItem::~ContactItem() |
114 | { | 114 | { |
115 | delete _contact; | 115 | delete _contact; |
116 | } | 116 | } |
117 | 117 | ||
118 | 118 | ||
119 | QString ContactItem::toRichText() | 119 | QString ContactItem::toRichText() |
120 | { | 120 | { |
121 | return _contact->toRichText(); | 121 | return _contact->toRichText(); |
122 | } | 122 | } |
123 | 123 | ||
124 | void ContactItem::action( int act ) | 124 | void ContactItem::action( int act ) |
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp index 6070fdf..adce926 100644 --- a/core/pim/osearch/mainwindow.cpp +++ b/core/pim/osearch/mainwindow.cpp | |||
@@ -21,87 +21,86 @@ | |||
21 | #include <qpe/config.h> | 21 | #include <qpe/config.h> |
22 | #include <qpe/global.h> | 22 | #include <qpe/global.h> |
23 | #include <opie/owait.h> | 23 | #include <opie/owait.h> |
24 | #include <qaction.h> | 24 | #include <qaction.h> |
25 | #include <qmessagebox.h> | 25 | #include <qmessagebox.h> |
26 | #include <qpopupmenu.h> | 26 | #include <qpopupmenu.h> |
27 | #include <qtoolbutton.h> | 27 | #include <qtoolbutton.h> |
28 | #include <qstring.h> | 28 | #include <qstring.h> |
29 | #include <qlabel.h> | 29 | #include <qlabel.h> |
30 | #include <qfile.h> | 30 | #include <qfile.h> |
31 | #include <qhbuttongroup.h> | 31 | #include <qhbuttongroup.h> |
32 | #include <qpushbutton.h> | 32 | #include <qpushbutton.h> |
33 | #include <qintdict.h> | 33 | #include <qintdict.h> |
34 | #include <qlayout.h> | 34 | #include <qlayout.h> |
35 | #include <qlineedit.h> | 35 | #include <qlineedit.h> |
36 | #include <qtextbrowser.h> | 36 | #include <qtextbrowser.h> |
37 | #include <qregexp.h> | 37 | #include <qregexp.h> |
38 | 38 | ||
39 | #include "olistview.h" | 39 | #include "olistview.h" |
40 | #include "olistviewitem.h" | 40 | #include "olistviewitem.h" |
41 | #include "resultitem.h" | 41 | #include "resultitem.h" |
42 | #include "adresssearch.h" | 42 | #include "adresssearch.h" |
43 | #include "todosearch.h" | 43 | #include "todosearch.h" |
44 | #include "datebooksearch.h" | 44 | #include "datebooksearch.h" |
45 | #include "applnksearch.h" | 45 | #include "applnksearch.h" |
46 | #include "doclnksearch.h" | 46 | #include "doclnksearch.h" |
47 | 47 | ||
48 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : | 48 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : |
49 | QMainWindow( parent, name, f ), _currentItem(0) | 49 | QMainWindow( parent, name, f ), _currentItem(0) |
50 | { | 50 | { |
51 | setCaption( tr("OSearch") ); | 51 | setCaption( tr("OSearch") ); |
52 | 52 | ||
53 | setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding)); | 53 | setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); |
54 | 54 | ||
55 | QFrame *mainFrame = new QFrame( this, "mainFrame" ); | 55 | QFrame *mainFrame = new QFrame( this, "mainFrame" ); |
56 | mainFrame->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); | ||
56 | 57 | ||
57 | mainLayout = new QVBoxLayout( mainFrame ); | 58 | mainLayout = new QVBoxLayout( mainFrame ); |
58 | mainLayout->setSpacing( 0 ); | 59 | mainLayout->setSpacing( 0 ); |
59 | mainLayout->setMargin( 0 ); | 60 | mainLayout->setMargin( 0 ); |
60 | 61 | ||
61 | resultsList = new OListView( mainFrame ); | 62 | resultsList = new OListView( mainFrame ); |
62 | resultsList->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding)); | 63 | resultsList->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); |
63 | mainLayout->addWidget( resultsList, 1 ); | 64 | mainLayout->addWidget( resultsList ); |
64 | 65 | ||
65 | detailsFrame = new QFrame( mainFrame, "detailsFrame" ); | 66 | detailsFrame = new QFrame( mainFrame, "detailsFrame" ); |
66 | QVBoxLayout *detailsLayout = new QVBoxLayout( detailsFrame ); | 67 | QVBoxLayout *detailsLayout = new QVBoxLayout( detailsFrame ); |
67 | richEdit = new QTextView( detailsFrame ); | 68 | richEdit = new QTextView( detailsFrame ); |
68 | richEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding)); | 69 | richEdit->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); |
69 | //richEdit->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum )); | 70 | detailsLayout->addWidget( richEdit ); |
70 | detailsLayout->addWidget( richEdit, 1 ); | ||
71 | 71 | ||
72 | buttonGroupActions = new QHButtonGroup( this ); | 72 | buttonGroupActions = new QHButtonGroup( this ); |
73 | buttonGroupActions->hide(); | 73 | buttonGroupActions->hide(); |
74 | _buttonCount = 0; | 74 | _buttonCount = 0; |
75 | // buttonGroupActions->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); | ||
76 | 75 | ||
77 | buttonLayout = new QHBoxLayout( detailsFrame ); | 76 | buttonLayout = new QHBoxLayout( detailsFrame ); |
78 | detailsLayout->addLayout( buttonLayout ); | 77 | detailsLayout->addLayout( buttonLayout ); |
79 | 78 | ||
80 | mainLayout->addWidget( detailsFrame ); | 79 | mainLayout->addWidget( detailsFrame ); |
81 | detailsFrame->hide(); | 80 | detailsFrame->hide(); |
82 | 81 | ||
83 | searches.append( new AppLnkSearch( resultsList, tr("applications") ) ); | 82 | searches.append( new AppLnkSearch( resultsList, tr("applications") ) ); |
84 | searches.append( new DocLnkSearch( resultsList, tr("documents") ) ); | 83 | searches.append( new DocLnkSearch( resultsList, tr("documents") ) ); |
85 | searches.append( new TodoSearch( resultsList, tr("todo") ) ); | 84 | searches.append( new TodoSearch( resultsList, tr("todo") ) ); |
86 | searches.append( new DatebookSearch( resultsList, tr("datebook") ) ); | 85 | searches.append( new DatebookSearch( resultsList, tr("datebook") ) ); |
87 | searches.append( new AdressSearch( resultsList, tr("adressbook") ) ); | 86 | searches.append( new AdressSearch( resultsList, tr("adressbook") ) ); |
88 | 87 | ||
89 | setCentralWidget( mainFrame ); | 88 | setCentralWidget( mainFrame ); |
90 | 89 | ||
91 | popupTimer = new QTimer(); | 90 | popupTimer = new QTimer(); |
92 | searchTimer = new QTimer(); | 91 | searchTimer = new QTimer(); |
93 | 92 | ||
94 | connect(popupTimer, SIGNAL(timeout()), SLOT(showPopup())); | 93 | connect(popupTimer, SIGNAL(timeout()), SLOT(showPopup())); |
95 | connect(searchTimer, SIGNAL(timeout()), SLOT(searchStringChanged())); | 94 | connect(searchTimer, SIGNAL(timeout()), SLOT(searchStringChanged())); |
96 | connect(resultsList, SIGNAL(pressed(QListViewItem*)), SLOT(setCurrent(QListViewItem*))); | 95 | connect(resultsList, SIGNAL(pressed(QListViewItem*)), SLOT(setCurrent(QListViewItem*))); |
97 | connect(resultsList, SIGNAL(clicked(QListViewItem*)), SLOT(stopTimer(QListViewItem*))); | 96 | connect(resultsList, SIGNAL(clicked(QListViewItem*)), SLOT(stopTimer(QListViewItem*))); |
98 | connect(buttonGroupActions, SIGNAL(clicked(int)), SLOT( slotAction(int) ) ); | 97 | connect(buttonGroupActions, SIGNAL(clicked(int)), SLOT( slotAction(int) ) ); |
99 | 98 | ||
100 | makeMenu(); | 99 | makeMenu(); |
101 | 100 | ||
102 | Config cfg( "osearch", Config::User ); | 101 | Config cfg( "osearch", Config::User ); |
103 | cfg.setGroup( "search_settings" ); | 102 | cfg.setGroup( "search_settings" ); |
104 | actionCaseSensitiv->setOn( cfg.readBoolEntry( "caseSensitiv", false ) ); | 103 | actionCaseSensitiv->setOn( cfg.readBoolEntry( "caseSensitiv", false ) ); |
105 | actionWildcards->setOn( cfg.readBoolEntry( "wildcards", false ) ); | 104 | actionWildcards->setOn( cfg.readBoolEntry( "wildcards", false ) ); |
106 | // actionWholeWordsOnly->setOn( cfg.readBoolEntry( "whole_words_only", false ) ); | 105 | // actionWholeWordsOnly->setOn( cfg.readBoolEntry( "whole_words_only", false ) ); |
107 | } | 106 | } |
diff --git a/core/pim/osearch/opie-osearch.control b/core/pim/osearch/opie-osearch.control index d7e3310..9f1bf5f 100644 --- a/core/pim/osearch/opie-osearch.control +++ b/core/pim/osearch/opie-osearch.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Packagename: opie-osearch | 1 | Packagename: opie-osearch |
2 | Files: bin/osearch apps/1Pim/osearch.desktop pics/osearch/OSearch.png | 2 | Files: bin/osearch apps/1Pim/osearch.desktop pics/osearch/*.png |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/ | 4 | Section: opie/ |
5 | Maintainer: Patrick S. Vogt <tille@handhelds.org> | 5 | Maintainer: Patrick S. Vogt <tille@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: $QPE_VERSION-$SUB_VERSION | 7 | Version: $QPE_VERSION-$SUB_VERSION |
8 | Depends: task-opie-minimal | 8 | Depends: task-opie-minimal |
9 | Description: search... | 9 | Description: search... |
10 | 10 | ||