qt4
This commit is contained in:
parent
8fe7cb37d3
commit
99ec1aee93
@ -12,7 +12,8 @@ HEADERS += \
|
|||||||
../qtgui/sort_w.h \
|
../qtgui/sort_w.h \
|
||||||
../qtgui/searchclause_w.h \
|
../qtgui/searchclause_w.h \
|
||||||
../qtgui/ssearch_w.h \
|
../qtgui/ssearch_w.h \
|
||||||
../qtgui/uiprefs_w.h
|
../qtgui/uiprefs_w.h \
|
||||||
|
../qtgui/viewaction_w.h
|
||||||
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
@ -28,7 +29,8 @@ SOURCES += \
|
|||||||
../qtgui/sort_w.cpp \
|
../qtgui/sort_w.cpp \
|
||||||
../qtgui/searchclause_w.cpp \
|
../qtgui/searchclause_w.cpp \
|
||||||
../qtgui/ssearch_w.cpp \
|
../qtgui/ssearch_w.cpp \
|
||||||
../qtgui/uiprefs_w.cpp
|
../qtgui/uiprefs_w.cpp \
|
||||||
|
../qtgui/viewaction_w.cpp
|
||||||
|
|
||||||
FORMS = \
|
FORMS = \
|
||||||
advsearch.ui \
|
advsearch.ui \
|
||||||
@ -37,7 +39,8 @@ FORMS = \
|
|||||||
rclmain.ui \
|
rclmain.ui \
|
||||||
sort.ui \
|
sort.ui \
|
||||||
ssearchb.ui \
|
ssearchb.ui \
|
||||||
uiprefs.ui
|
uiprefs.ui \
|
||||||
|
viewaction.ui
|
||||||
|
|
||||||
RESOURCES = recoll.qrc
|
RESOURCES = recoll.qrc
|
||||||
|
|
||||||
|
|||||||
@ -59,14 +59,20 @@
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>Sunken</enum>
|
<enum>Sunken</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="resizePolicy">
|
||||||
|
<enum>Manual</enum>
|
||||||
|
</property>
|
||||||
<property name="selectionMode">
|
<property name="selectionMode">
|
||||||
<enum>Extended</enum>
|
<enum>Extended</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="allColumnsShowFocus">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="showSortIndicator">
|
<property name="showSortIndicator">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="resizeMode">
|
<property name="resizeMode">
|
||||||
<enum>AllColumns</enum>
|
<enum>LastColumn</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip" stdset="0">
|
<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>
|
<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
|
#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
|
#endif
|
||||||
/*
|
/*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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;
|
using namespace std;
|
||||||
|
|
||||||
#include <qcombobox.h>
|
|
||||||
#include <qspinbox.h>
|
|
||||||
#include <qcheckbox.h>
|
|
||||||
#include <qpushbutton.h>
|
#include <qpushbutton.h>
|
||||||
|
#include <qtimer.h>
|
||||||
|
|
||||||
|
#if (QT_VERSION < 0x040000)
|
||||||
#include <qlistview.h>
|
#include <qlistview.h>
|
||||||
#include <qlayout.h>
|
#else
|
||||||
|
#include <q3listview.h>
|
||||||
|
#define QListView Q3ListView
|
||||||
|
#define QListViewItem Q3ListViewItem
|
||||||
|
#define QListViewItemIterator Q3ListViewItemIterator
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <qmessagebox.h>
|
#include <qmessagebox.h>
|
||||||
#include <qinputdialog.h>
|
#include <qinputdialog.h>
|
||||||
|
|
||||||
@ -42,13 +48,24 @@ void ViewAction::init()
|
|||||||
{
|
{
|
||||||
connect(closePB, SIGNAL(clicked()), this, SLOT(close()));
|
connect(closePB, SIGNAL(clicked()), this, SLOT(close()));
|
||||||
connect(chgActPB, SIGNAL(clicked()), this, SLOT(editAction()));
|
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()));
|
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();
|
fillLists();
|
||||||
actionsLV->setColumnWidth(0, 150);
|
resize(QSize(450, 250).expandedTo(minimumSizeHint()) );
|
||||||
actionsLV->setColumnWidth(1, 150);
|
|
||||||
resize(550,350);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewAction::fillLists()
|
void ViewAction::fillLists()
|
||||||
{
|
{
|
||||||
actionsLV->clear();
|
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()
|
void ViewAction::editAction()
|
||||||
{
|
{
|
||||||
QString action0;
|
QString action0;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#ifndef _VIEWACTION_W_H_INCLUDED_
|
#ifndef _VIEWACTION_W_H_INCLUDED_
|
||||||
#define _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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -63,6 +63,7 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void editAction();
|
virtual void editAction();
|
||||||
|
virtual void listDblClicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void init();
|
virtual void init();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user