Switch to unified view

a/src/qtgui/viewaction_w.cpp b/src/qtgui/viewaction_w.cpp
...
...
26
#include <qpushbutton.h>
26
#include <qpushbutton.h>
27
#include <qtimer.h>
27
#include <qtimer.h>
28
28
29
#if (QT_VERSION < 0x040000)
29
#if (QT_VERSION < 0x040000)
30
#include <qlistview.h>
30
#include <qlistview.h>
31
#define QLVEXACTMATCH Qt::ExactMatch
31
#else
32
#else
32
#include <q3listview.h>
33
#include <q3listview.h>
33
#define QListView Q3ListView
34
#define QListView Q3ListView
34
#define QListViewItem Q3ListViewItem
35
#define QListViewItem Q3ListViewItem
35
#define QListViewItemIterator Q3ListViewItemIterator
36
#define QListViewItemIterator Q3ListViewItemIterator
37
#define QLVEXACTMATCH Q3ListView::ExactMatch
36
#endif
38
#endif
37
39
38
#include <qmessagebox.h>
40
#include <qmessagebox.h>
39
#include <qinputdialog.h>
41
#include <qinputdialog.h>
40
#include <qlayout.h>
42
#include <qlayout.h>
...
...
55
#else
57
#else
56
       SIGNAL(doubleClicked(Q3ListViewItem *, const QPoint &, int)),
58
       SIGNAL(doubleClicked(Q3ListViewItem *, const QPoint &, int)),
57
#endif
59
#endif
58
       this, SLOT(editAction()));
60
       this, SLOT(editAction()));
59
    fillLists();
61
    fillLists();
60
    resize(QSize(450, 250).expandedTo(minimumSizeHint()) );
62
    resize(QSize(640, 250).expandedTo(minimumSizeHint()) );
61
}
63
}
62
64
63
void ViewAction::fillLists()
65
void ViewAction::fillLists()
64
{
66
{
65
    actionsLV->clear();
67
    actionsLV->clear();
...
...
70
    new QListViewItem(actionsLV, 
72
    new QListViewItem(actionsLV, 
71
              QString::fromAscii(it->first.c_str()),
73
              QString::fromAscii(it->first.c_str()),
72
              QString::fromAscii(it->second.c_str()));
74
              QString::fromAscii(it->second.c_str()));
73
    }
75
    }
74
76
77
}
78
79
void ViewAction::selectMT(const QString& mt)
80
{
81
    QListViewItem *item =  actionsLV->findItem(mt, 0, QLVEXACTMATCH);
82
    if (item) {
83
  actionsLV->ensureItemVisible(item);
84
  actionsLV->setSelected(item, true);
85
  actionsLV->setSelectionAnchor(item);
86
    }
75
}
87
}
76
88
77
// To avoid modifying the listview state from the dbl click signal, as
89
// To avoid modifying the listview state from the dbl click signal, as
78
// advised by the manual
90
// advised by the manual
79
void ViewAction::listDblClicked()
91
void ViewAction::listDblClicked()