|
a/src/qtgui/ssearch_w.cpp |
|
b/src/qtgui/ssearch_w.cpp |
|
... |
|
... |
54 |
connect(clearqPB, SIGNAL(clicked()),
|
54 |
connect(clearqPB, SIGNAL(clicked()),
|
55 |
queryText->lineEdit(), SLOT(clear()));
|
55 |
queryText->lineEdit(), SLOT(clear()));
|
56 |
connect(searchPB, SIGNAL(clicked()), this, SLOT(startSimpleSearch()));
|
56 |
connect(searchPB, SIGNAL(clicked()), this, SLOT(startSimpleSearch()));
|
57 |
connect(searchTypCMB, SIGNAL(activated(int)), this, SLOT(searchTypeChanged(int)));
|
57 |
connect(searchTypCMB, SIGNAL(activated(int)), this, SLOT(searchTypeChanged(int)));
|
58 |
|
58 |
|
59 |
#if QT_VERSION >= 0x040000
|
|
|
60 |
queryText->installEventFilter(this);
|
59 |
queryText->installEventFilter(this);
|
61 |
#else
|
|
|
62 |
queryText->lineEdit()->installEventFilter(this);
|
|
|
63 |
#endif
|
|
|
64 |
m_escape = false;
|
60 |
m_escape = false;
|
65 |
}
|
61 |
}
|
66 |
|
62 |
|
67 |
void SSearch::searchTextChanged(const QString& text)
|
63 |
void SSearch::searchTextChanged(const QString& text)
|
68 |
{
|
64 |
{
|
|
... |
|
... |
307 |
}
|
303 |
}
|
308 |
}
|
304 |
}
|
309 |
|
305 |
|
310 |
#undef SHOWEVENTS
|
306 |
#undef SHOWEVENTS
|
311 |
#if defined(SHOWEVENTS)
|
307 |
#if defined(SHOWEVENTS)
|
312 |
#if QT_VERSION < 0x040000
|
|
|
313 |
static const char *eventTypeToStr(int tp)
|
|
|
314 |
{
|
|
|
315 |
switch (tp) {
|
|
|
316 |
case 0: return "None";
|
|
|
317 |
case 1: return "Timer";
|
|
|
318 |
case 2: return "MouseButtonPress";
|
|
|
319 |
case 3: return "MouseButtonRelease";
|
|
|
320 |
case 4: return "MouseButtonDblClick";
|
|
|
321 |
case 5: return "MouseMove";
|
|
|
322 |
case 6: return "KeyPress";
|
|
|
323 |
case 7: return "KeyRelease";
|
|
|
324 |
case 8: return "FocusIn";
|
|
|
325 |
case 9: return "FocusOut";
|
|
|
326 |
case 10: return "Enter";
|
|
|
327 |
case 11: return "Leave";
|
|
|
328 |
case 12: return "Paint";
|
|
|
329 |
case 13: return "Move";
|
|
|
330 |
case 14: return "Resize";
|
|
|
331 |
case 15: return "Create";
|
|
|
332 |
case 16: return "Destroy";
|
|
|
333 |
case 17: return "Show";
|
|
|
334 |
case 18: return "Hide";
|
|
|
335 |
case 19: return "Close";
|
|
|
336 |
case 20: return "Quit";
|
|
|
337 |
case 21: return "Reparent";
|
|
|
338 |
case 22: return "ShowMinimized";
|
|
|
339 |
case 23: return "ShowNormal";
|
|
|
340 |
case 24: return "WindowActivate";
|
|
|
341 |
case 25: return "WindowDeactivate";
|
|
|
342 |
case 26: return "ShowToParent";
|
|
|
343 |
case 27: return "HideToParent";
|
|
|
344 |
case 28: return "ShowMaximized";
|
|
|
345 |
case 29: return "ShowFullScreen";
|
|
|
346 |
case 30: return "Accel";
|
|
|
347 |
case 31: return "Wheel";
|
|
|
348 |
case 32: return "AccelAvailable";
|
|
|
349 |
case 33: return "CaptionChange";
|
|
|
350 |
case 34: return "IconChange";
|
|
|
351 |
case 35: return "ParentFontChange";
|
|
|
352 |
case 36: return "ApplicationFontChange";
|
|
|
353 |
case 37: return "ParentPaletteChange";
|
|
|
354 |
case 38: return "ApplicationPaletteChange";
|
|
|
355 |
case 39: return "PaletteChange";
|
|
|
356 |
case 40: return "Clipboard";
|
|
|
357 |
case 42: return "Speech";
|
|
|
358 |
case 50: return "SockAct";
|
|
|
359 |
case 51: return "AccelOverride";
|
|
|
360 |
case 52: return "DeferredDelete";
|
|
|
361 |
case 60: return "DragEnter";
|
|
|
362 |
case 61: return "DragMove";
|
|
|
363 |
case 62: return "DragLeave";
|
|
|
364 |
case 63: return "Drop";
|
|
|
365 |
case 64: return "DragResponse";
|
|
|
366 |
case 70: return "ChildInserted";
|
|
|
367 |
case 71: return "ChildRemoved";
|
|
|
368 |
case 72: return "LayoutHint";
|
|
|
369 |
case 73: return "ShowWindowRequest";
|
|
|
370 |
case 74: return "WindowBlocked";
|
|
|
371 |
case 75: return "WindowUnblocked";
|
|
|
372 |
case 80: return "ActivateControl";
|
|
|
373 |
case 81: return "DeactivateControl";
|
|
|
374 |
case 82: return "ContextMenu";
|
|
|
375 |
case 83: return "IMStart";
|
|
|
376 |
case 84: return "IMCompose";
|
|
|
377 |
case 85: return "IMEnd";
|
|
|
378 |
case 86: return "Accessibility";
|
|
|
379 |
case 87: return "TabletMove";
|
|
|
380 |
case 88: return "LocaleChange";
|
|
|
381 |
case 89: return "LanguageChange";
|
|
|
382 |
case 90: return "LayoutDirectionChange";
|
|
|
383 |
case 91: return "Style";
|
|
|
384 |
case 92: return "TabletPress";
|
|
|
385 |
case 93: return "TabletRelease";
|
|
|
386 |
case 94: return "OkRequest";
|
|
|
387 |
case 95: return "HelpRequest";
|
|
|
388 |
case 96: return "WindowStateChange";
|
|
|
389 |
case 97: return "IconDrag";
|
|
|
390 |
case 1000: return "User";
|
|
|
391 |
case 65535: return "MaxUser";
|
|
|
392 |
default: return "Unknown";
|
|
|
393 |
}
|
|
|
394 |
}
|
|
|
395 |
#else
|
|
|
396 |
static const char *eventTypeToStr(int tp)
|
308 |
static const char *eventTypeToStr(int tp)
|
397 |
{
|
309 |
{
|
398 |
switch (tp) {
|
310 |
switch (tp) {
|
399 |
case 0: return "None";
|
311 |
case 0: return "None";
|
400 |
case 1: return "Timer";
|
312 |
case 1: return "Timer";
|
|
... |
|
... |
529 |
case 172: return "TabletLeaveProximity";
|
441 |
case 172: return "TabletLeaveProximity";
|
530 |
default: return "UnknownEvent";
|
442 |
default: return "UnknownEvent";
|
531 |
}
|
443 |
}
|
532 |
}
|
444 |
}
|
533 |
#endif
|
445 |
#endif
|
534 |
#endif
|
|
|
535 |
|
446 |
|
536 |
bool SSearch::eventFilter(QObject *, QEvent *event)
|
447 |
bool SSearch::eventFilter(QObject *, QEvent *event)
|
537 |
{
|
448 |
{
|
538 |
#if defined(SHOWEVENTS)
|
449 |
#if defined(SHOWEVENTS)
|
539 |
if (event->type() == QEvent::Timer ||
|
450 |
if (event->type() == QEvent::Timer ||
|