Switch to unified view

a/src/qtgui/preview_w.h b/src/qtgui/preview_w.h
1
#ifndef _PREVIEW_W_H_INCLUDED_
1
#ifndef _PREVIEW_W_H_INCLUDED_
2
#define _PREVIEW_W_H_INCLUDED_
2
#define _PREVIEW_W_H_INCLUDED_
3
/* @(#$Id: preview_w.h,v 1.4 2006-11-17 10:09:07 dockes Exp $  (C) 2006 J.F.Dockes */
3
/* @(#$Id: preview_w.h,v 1.5 2006-12-04 06:19:11 dockes Exp $  (C) 2006 J.F.Dockes */
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
8
 *   (at your option) any later version.
8
 *   (at your option) any later version.
...
...
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
 */
19
 */
20
20
21
#include <qvariant.h>
21
#include <qvariant.h>
22
#include <qwidget.h>
22
#include <qwidget.h>
23
23
#include "rcldb.h"
24
#include "rcldb.h"
25
#if (QT_VERSION < 0x040000)
24
#include "preview.h"
26
#include "preview.h"
27
#else
28
#include "ui_preview.h"
29
#endif
25
#include "refcntr.h"
30
#include "refcntr.h"
26
#include "searchdata.h"
31
#include "searchdata.h"
27
32
28
// We keep a list of data associated to each tab
33
// We keep a list of data associated to each tab
29
class TabData {
34
class TabData {
...
...
35
40
36
41
37
    TabData(QWidget *wi) : w(wi) {}
42
    TabData(QWidget *wi) : w(wi) {}
38
};
43
};
39
44
45
class QTextEdit;
46
47
//MOC_SKIP_BEGIN
48
#if QT_VERSION < 0x040000
49
class DummyPreviewBase : public PreviewBase
50
{
51
 public: DummyPreviewBase(QWidget* parent = 0) : PreviewBase(parent)  {}
52
};
53
#else
54
class DummyPreviewBase : public QWidget, public Ui::PreviewBase
55
{
56
 public: DummyPreviewBase(QWidget* parent) {setupUi(parent);}
57
};
58
#endif
59
//MOC_SKIP_END
60
40
class Preview : public PreviewBase
61
class Preview : public DummyPreviewBase
41
{
62
{
42
    Q_OBJECT
63
    Q_OBJECT
43
64
44
public:
65
public:
45
    Preview(QWidget* parent = 0, const char* name = 0, WFlags fl = 0) :
66
    Preview(QWidget* parent = 0) 
46
    PreviewBase(parent,name,fl) {init();}
67
    : DummyPreviewBase(parent) {init();}
47
  
68
48
    ~Preview(){}
69
    ~Preview(){}
49
70
50
    virtual void setSId(int sid, RefCntr<Rcl::SearchData> sdata) 
71
    virtual void setSId(int sid, RefCntr<Rcl::SearchData> sdata) 
51
    {
72
    {
52
    m_searchId = sid;
73
    m_searchId = sid;