[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: How to make one search line work with several qlistwidgets?
From: Cyrille Berger <cberger () cberger ! net>
Date: 2010-10-05 12:39:12
Message-ID: 201010051439.12174.cberger () cberger ! net
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On tisdag 05 oktober 2010, Yue Liu wrote:
> Hi,
> I'm working on the shapecollection docker to make it usable as a
> stencil selector for Kivio. Considering there will be many shapes
> appear in the docker, I wanna add search line to the docker. But each
> shape collection uses one QListWidget, I'm wondering how can I use one
> search line to filter several qlistwidgets?
I think you have to use a QListView and QListModel in combination with
QSortFilterProxyModel, then you can just set what you want to search for in
each of your QSortFilterProxyModel.
> By the way I'm considering use desktop entry files for i18n
> informations to those odf stencils(name, tool tip, family, etc.) Any
> hints about how to manipulate this format in kde applications?
If you meant, i18n extraction, you can have look at what we do in krita for
brushes:
http://websvn.kde.org/trunk/koffice/krita/Messages.sh?revision=1174854&view=markup
http://websvn.kde.org/trunk/koffice/krita/extracti18n.pl?revision=710319&view=markup
Basically the extracti18n.pl script generates a file with i18n("brushname");
from the content extracted from the brushes name. And then in Messages.sh we
regenerate the file.
--
Cyrille Berger
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'DejaVu Sans Mono'; font-size:9pt; \
font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">On tisdag 05 oktober 2010, Yue Liu wrote:</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Hi,</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> I'm working on the \
shapecollection docker to make it usable as a</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> stencil selector for Kivio. Considering \
there will be many shapes</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">> appear in the docker, I wanna add search line to the docker. \
But each</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> shape \
collection uses one QListWidget, I'm wondering how can I use one</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> search line to filter \
several qlistwidgets?</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">I think you have to use a QListView and QListModel in combination \
with QSortFilterProxyModel, then you can just set what you want to search for in each \
of your QSortFilterProxyModel.</p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> By the way I'm \
considering use desktop entry files for i18n</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> informations to those odf stencils(name, \
tool tip, family, etc.) Any</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">> hints about how to manipulate this format in kde \
applications?</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;"></p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">If you meant, i18n extraction, you can have look \
at what we do in krita for brushes:</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">http://websvn.kde.org/trunk/koffice/krita/Messages.sh?revision=1174854&view=markup</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">http://websvn.kde.org/trunk/koffice/krita/extracti18n.pl?revision=710319&view=markup</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"></p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">Basically the extracti18n.pl script generates a file with \
i18n("brushname"); from the content extracted from the brushes name. And \
then in Messages.sh we regenerate the file.</p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"></p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Cyrille \
Berger</p></body></html>
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic