mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-25 03:12:49 +00:00
Merge branch 'master' of https://github.com/fluxer/kdelibs into devinfo
This commit is contained in:
commit
d006e1291a
14 changed files with 22 additions and 66 deletions
|
@ -93,13 +93,13 @@ void KFileMetaDataConfigurationWidget::Private::addItem(const KUrl& uri)
|
||||||
// available from KFileItem as "fixed item" (see above)
|
// available from KFileItem as "fixed item" (see above)
|
||||||
// should not be shown as second entry.
|
// should not be shown as second entry.
|
||||||
static const char* const hiddenProperties[] = {
|
static const char* const hiddenProperties[] = {
|
||||||
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#comment", // = fixed item kfileitem#comment
|
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#comment", // = fixed item kfileitem#comment
|
||||||
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentSize", // = fixed item kfileitem#size
|
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#contentSize", // = fixed item kfileitem#size
|
||||||
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#lastModified", // = fixed item kfileitem#modified
|
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#lastModified", // = fixed item kfileitem#modified
|
||||||
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#plainTextContent" // hide this property always
|
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#plainTextContent", // hide this property always
|
||||||
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType", // = fixed item kfileitem#type
|
"http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType", // = fixed item kfileitem#mimetype
|
||||||
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName", // hide this property always
|
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName", // hide this property always
|
||||||
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type", // = fixed item kfileitem#type
|
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type", // = fixed item kfileitem#type
|
||||||
0 // mandatory last entry
|
0 // mandatory last entry
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ void KFileMetaDataProvider::Private::readMetadata()
|
||||||
kWarning() << "the API does not handle multile URLs metadata";
|
kWarning() << "the API does not handle multile URLs metadata";
|
||||||
}
|
}
|
||||||
const QString path = m_urls.first().toLocalFile();
|
const QString path = m_urls.first().toLocalFile();
|
||||||
KFileMetaInfo metaInfo(path, KFileMetaInfo::Fastest);
|
KFileMetaInfo metaInfo(path, KFileMetaInfo::TechnicalInfo);
|
||||||
const QHash<QString, KFileMetaInfoItem> metaInfoItems = metaInfo.items();
|
const QHash<QString, KFileMetaInfoItem> metaInfoItems = metaInfo.items();
|
||||||
foreach (const KFileMetaInfoItem& metaInfoItem, metaInfoItems) {
|
foreach (const KFileMetaInfoItem& metaInfoItem, metaInfoItems) {
|
||||||
const QString uriString = metaInfoItem.name();
|
const QString uriString = metaInfoItem.name();
|
||||||
|
|
|
@ -322,8 +322,15 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool useFactory(Strigi::StreamAnalyzerFactory* factory) const {
|
bool useFactory(Strigi::StreamAnalyzerFactory* factory) const {
|
||||||
Q_UNUSED(factory);
|
if ((m_indexDetail & KFileMetaInfo::ContentInfo) == 0 && factory) {
|
||||||
// TODO: filter factories based on m_indexDetail
|
if (qstrcmp(factory->name(), "CppLineAnalyzer") == 0) {
|
||||||
|
return false;
|
||||||
|
} else if (qstrcmp(factory->name(), "TxtLineAnalyzer") == 0) {
|
||||||
|
return false;
|
||||||
|
} else if (qstrcmp(factory->name(), "TextEndAnalyzer") == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,22 +61,16 @@ public:
|
||||||
* parameters to constructors.
|
* parameters to constructors.
|
||||||
*/
|
*/
|
||||||
enum What {
|
enum What {
|
||||||
Fastest = 0x1, /**< do the fastest possible read and omit all items
|
TechnicalInfo = 0x1, /** extract technical details about the file, like
|
||||||
that might need a significantly longer time
|
|
||||||
than the others */
|
|
||||||
TechnicalInfo = 0x2, /**< extract technical details about the file, like
|
|
||||||
e.g. play time, resolution or a compressioni
|
e.g. play time, resolution or a compressioni
|
||||||
type */
|
type */
|
||||||
ContentInfo = 0x4, /**< read information about the content of the file
|
ContentInfo = 0x2, /** read information about the content of the file
|
||||||
like comments or id3 tags */
|
like comments or id3 tags */
|
||||||
ExternalSources = 0x8, /**<read external metadata sources such as
|
ExternalSources = 0x4, /** read external metadata sources such as
|
||||||
filesystem based extended attributes if
|
filesystem based extended attributes if
|
||||||
they are supported for the filesystem;
|
they are supported for the filesystem;
|
||||||
RDF storages etc */
|
RDF storages etc */
|
||||||
Thumbnail = 0x10, /**< only read the file's thumbnail, if it contains
|
Everything = TechnicalInfo | ContentInfo | ExternalSources // read everything, even if it might take a while
|
||||||
one */
|
|
||||||
LinkedData = 0x40, //< extract linked/related files like html links, source #include etc
|
|
||||||
Everything = Fastest | TechnicalInfo | ContentInfo | ExternalSources | Thumbnail | LinkedData ///< read everything, even if it might take a while
|
|
||||||
|
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(WhatFlags, What)
|
Q_DECLARE_FLAGS(WhatFlags, What)
|
||||||
|
|
|
@ -42,8 +42,7 @@ class ComboBoxPrivate : public ThemedWidgetInterface<ComboBox>
|
||||||
public:
|
public:
|
||||||
ComboBoxPrivate(ComboBox *comboBox)
|
ComboBoxPrivate(ComboBox *comboBox)
|
||||||
: ThemedWidgetInterface<ComboBox>(comboBox),
|
: ThemedWidgetInterface<ComboBox>(comboBox),
|
||||||
background(0),
|
background(0)
|
||||||
underMouse(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +60,6 @@ public:
|
||||||
qreal opacity;
|
qreal opacity;
|
||||||
QRectF activeRect;
|
QRectF activeRect;
|
||||||
Style::Ptr style;
|
Style::Ptr style;
|
||||||
bool underMouse;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void ComboBoxPrivate::syncActiveRect()
|
void ComboBoxPrivate::syncActiveRect()
|
||||||
|
@ -267,11 +265,6 @@ void ComboBox::paint(QPainter *painter,
|
||||||
QStyle::PE_IndicatorArrowDown, &comboOpt, painter, nativeWidget());
|
QStyle::PE_IndicatorArrowDown, &comboOpt, painter, nativeWidget());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ComboBox::focusInEvent(QFocusEvent *event)
|
|
||||||
{
|
|
||||||
QGraphicsProxyWidget::focusInEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ComboBox::focusOutEvent(QFocusEvent *event)
|
void ComboBox::focusOutEvent(QFocusEvent *event)
|
||||||
{
|
{
|
||||||
QGraphicsWidget *widget = parentWidget();
|
QGraphicsWidget *widget = parentWidget();
|
||||||
|
@ -300,18 +293,6 @@ void ComboBox::focusOutEvent(QFocusEvent *event)
|
||||||
QGraphicsProxyWidget::focusOutEvent(event);
|
QGraphicsProxyWidget::focusOutEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ComboBox::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
|
||||||
{
|
|
||||||
d->underMouse = true;
|
|
||||||
QGraphicsProxyWidget::hoverEnterEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ComboBox::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
|
||||||
{
|
|
||||||
d->underMouse = false;
|
|
||||||
QGraphicsProxyWidget::hoverLeaveEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ComboBox::changeEvent(QEvent *event)
|
void ComboBox::changeEvent(QEvent *event)
|
||||||
{
|
{
|
||||||
d->changeEvent(event);
|
d->changeEvent(event);
|
||||||
|
|
|
@ -133,10 +133,7 @@ protected:
|
||||||
void paint(QPainter *painter,
|
void paint(QPainter *painter,
|
||||||
const QStyleOptionGraphicsItem *option,
|
const QStyleOptionGraphicsItem *option,
|
||||||
QWidget *widget);
|
QWidget *widget);
|
||||||
void focusInEvent(QFocusEvent *event);
|
|
||||||
void focusOutEvent(QFocusEvent *event);
|
void focusOutEvent(QFocusEvent *event);
|
||||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
|
||||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
|
||||||
void changeEvent(QEvent *event);
|
void changeEvent(QEvent *event);
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ class PLASMA_EXPORT ItemBackground : public QGraphicsWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QRectF target READ target WRITE setTarget)
|
Q_PROPERTY(QRectF target READ target WRITE setTarget)
|
||||||
Q_PROPERTY(QGraphicsItem* targetItem READ targetItem WRITE setTargetItem)
|
Q_PROPERTY(QGraphicsItem* targetItem READ targetItem WRITE setTargetItem)
|
||||||
|
|
||||||
Q_PROPERTY(qreal animationUpdate READ animationUpdate WRITE setAnimationUpdate)
|
Q_PROPERTY(qreal animationUpdate READ animationUpdate WRITE setAnimationUpdate)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -556,11 +556,6 @@ void Meter::paint(QPainter *p,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QSizeF Meter::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
|
|
||||||
{
|
|
||||||
return QGraphicsWidget::sizeHint(which, constraint);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // End of namepace
|
} // End of namepace
|
||||||
|
|
||||||
#include "moc_meter.cpp"
|
#include "moc_meter.cpp"
|
||||||
|
|
|
@ -215,7 +215,6 @@ protected:
|
||||||
virtual void paint(QPainter *p,
|
virtual void paint(QPainter *p,
|
||||||
const QStyleOptionGraphicsItem *option,
|
const QStyleOptionGraphicsItem *option,
|
||||||
QWidget *widget = 0);
|
QWidget *widget = 0);
|
||||||
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MeterPrivate *const d;
|
MeterPrivate *const d;
|
||||||
|
|
|
@ -264,9 +264,7 @@ Q_SIGNALS:
|
||||||
void viewportGeometryChanged(const QRectF &geomety);
|
void viewportGeometryChanged(const QRectF &geomety);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void resizeEvent(QGraphicsSceneResizeEvent *event);
|
void resizeEvent(QGraphicsSceneResizeEvent *event);
|
||||||
|
|
||||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||||
|
|
|
@ -148,11 +148,6 @@ void TextEdit::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||||
delete popup;
|
delete popup;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEdit::resizeEvent(QGraphicsSceneResizeEvent *event)
|
|
||||||
{
|
|
||||||
QGraphicsProxyWidget::resizeEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void TextEdit::changeEvent(QEvent *event)
|
void TextEdit::changeEvent(QEvent *event)
|
||||||
{
|
{
|
||||||
d->changeEvent(event);
|
d->changeEvent(event);
|
||||||
|
|
|
@ -113,7 +113,6 @@ Q_SIGNALS:
|
||||||
void textChanged();
|
void textChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QGraphicsSceneResizeEvent *event);
|
|
||||||
void changeEvent(QEvent *event);
|
void changeEvent(QEvent *event);
|
||||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||||
|
|
|
@ -443,13 +443,6 @@ QVariant ToolButton::itemChange(GraphicsItemChange change, const QVariant &value
|
||||||
return QGraphicsProxyWidget::itemChange(change, value);
|
return QGraphicsProxyWidget::itemChange(change, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSizeF ToolButton::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
|
|
||||||
{
|
|
||||||
QSizeF hint = QGraphicsProxyWidget::sizeHint(which, constraint);
|
|
||||||
|
|
||||||
return hint;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Plasma
|
} // namespace Plasma
|
||||||
|
|
||||||
#include "moc_toolbutton.cpp"
|
#include "moc_toolbutton.cpp"
|
||||||
|
|
|
@ -184,7 +184,6 @@ protected:
|
||||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||||
void changeEvent(QEvent *event);
|
void changeEvent(QEvent *event);
|
||||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||||
QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint) const;
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void setAnimationUpdate(qreal progress);
|
void setAnimationUpdate(qreal progress);
|
||||||
|
|
Loading…
Add table
Reference in a new issue