qt4
This commit is contained in:
parent
8fe7cb37d3
commit
99ec1aee93
@ -12,7 +12,8 @@ HEADERS += \
|
||||
../qtgui/sort_w.h \
|
||||
../qtgui/searchclause_w.h \
|
||||
../qtgui/ssearch_w.h \
|
||||
../qtgui/uiprefs_w.h
|
||||
../qtgui/uiprefs_w.h \
|
||||
../qtgui/viewaction_w.h
|
||||
|
||||
|
||||
SOURCES += \
|
||||
@ -28,7 +29,8 @@ SOURCES += \
|
||||
../qtgui/sort_w.cpp \
|
||||
../qtgui/searchclause_w.cpp \
|
||||
../qtgui/ssearch_w.cpp \
|
||||
../qtgui/uiprefs_w.cpp
|
||||
../qtgui/uiprefs_w.cpp \
|
||||
../qtgui/viewaction_w.cpp
|
||||
|
||||
FORMS = \
|
||||
advsearch.ui \
|
||||
@ -37,7 +39,8 @@ FORMS = \
|
||||
rclmain.ui \
|
||||
sort.ui \
|
||||
ssearchb.ui \
|
||||
uiprefs.ui
|
||||
uiprefs.ui \
|
||||
viewaction.ui
|
||||
|
||||
RESOURCES = recoll.qrc
|
||||
|
||||
|
||||
@ -59,14 +59,20 @@
|
||||
<property name="frameShadow">
|
||||
<enum>Sunken</enum>
|
||||
</property>
|
||||
<property name="resizePolicy">
|
||||
<enum>Manual</enum>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>Extended</enum>
|
||||
</property>
|
||||
<property name="allColumnsShowFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="showSortIndicator">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="resizeMode">
|
||||
<enum>AllColumns</enum>
|
||||
<enum>LastColumn</enum>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>Select one or several file types, then click Change Action to modify the program used to open them</string>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: viewaction_w.cpp,v 1.2 2006-12-18 12:05:29 dockes Exp $ (C) 2006 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: viewaction_w.cpp,v 1.3 2006-12-18 16:45:52 dockes Exp $ (C) 2006 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -23,12 +23,18 @@ static char rcsid[] = "@(#$Id: viewaction_w.cpp,v 1.2 2006-12-18 12:05:29 dockes
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include <qcombobox.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qcheckbox.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qtimer.h>
|
||||
|
||||
#if (QT_VERSION < 0x040000)
|
||||
#include <qlistview.h>
|
||||
#include <qlayout.h>
|
||||
#else
|
||||
#include <q3listview.h>
|
||||
#define QListView Q3ListView
|
||||
#define QListViewItem Q3ListViewItem
|
||||
#define QListViewItemIterator Q3ListViewItemIterator
|
||||
#endif
|
||||
|
||||
#include <qmessagebox.h>
|
||||
#include <qinputdialog.h>
|
||||
|
||||
@ -42,13 +48,24 @@ void ViewAction::init()
|
||||
{
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(chgActPB, SIGNAL(clicked()), this, SLOT(editAction()));
|
||||
connect(actionsLV,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),
|
||||
connect(actionsLV,
|
||||
#if (QT_VERSION < 0x040000)
|
||||
SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)),
|
||||
#else
|
||||
SIGNAL(doubleClicked(Q3ListViewItem *, const QPoint &, int)),
|
||||
#endif
|
||||
this, SLOT(editAction()));
|
||||
|
||||
// Note: could get the column width setting to work in qt4
|
||||
actionsLV->setColumnWidthMode(0, QListView::Manual);
|
||||
actionsLV->setColumnWidth(0, 300);
|
||||
actionsLV->setColumnWidthMode(1, QListView::Manual);
|
||||
actionsLV->setColumnWidth(1, 120);
|
||||
|
||||
fillLists();
|
||||
actionsLV->setColumnWidth(0, 150);
|
||||
actionsLV->setColumnWidth(1, 150);
|
||||
resize(550,350);
|
||||
resize(QSize(450, 250).expandedTo(minimumSizeHint()) );
|
||||
}
|
||||
|
||||
void ViewAction::fillLists()
|
||||
{
|
||||
actionsLV->clear();
|
||||
@ -63,6 +80,13 @@ void ViewAction::fillLists()
|
||||
|
||||
}
|
||||
|
||||
// To avoid modifying the listview state from the dbl click signal, as
|
||||
// advised by the manual
|
||||
void ViewAction::listDblClicked()
|
||||
{
|
||||
QTimer::singleShot(0, this, SLOT(editAction()));
|
||||
}
|
||||
|
||||
void ViewAction::editAction()
|
||||
{
|
||||
QString action0;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#ifndef _VIEWACTION_W_H_INCLUDED_
|
||||
#define _VIEWACTION_W_H_INCLUDED_
|
||||
/* @(#$Id: viewaction_w.h,v 1.2 2006-12-18 12:05:29 dockes Exp $ (C) 2006 J.F.Dockes */
|
||||
/* @(#$Id: viewaction_w.h,v 1.3 2006-12-18 16:45:52 dockes Exp $ (C) 2006 J.F.Dockes */
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -63,6 +63,7 @@ public:
|
||||
|
||||
public slots:
|
||||
virtual void editAction();
|
||||
virtual void listDblClicked();
|
||||
|
||||
private:
|
||||
virtual void init();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user