[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kutils
From: Albert Astals Cid <tsdgeos () terra ! es>
Date: 2010-04-09 19:14:26
Message-ID: 20100409191426.224C9AC895 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1113046 by aacid:
add a method to know if print preview will be available as discussed with dfaure
M +5 -0 kprintpreview.cpp
M +6 -0 kprintpreview.h
--- trunk/KDE/kdelibs/kutils/kprintpreview.cpp #1113045:1113046
@@ -162,6 +162,11 @@
KDialog::showEvent(event);
}
+bool KPrintPreview::isAvailable()
+{
+ return !KMimeTypeTrader::self()->query("application/pdf", "KParts/ReadOnlyPart").isEmpty();
+}
+
#include "kprintpreview.moc"
--- trunk/KDE/kdelibs/kutils/kprintpreview.h #1113045:1113046
@@ -57,6 +57,12 @@
explicit KPrintPreview(QPrinter *printer, QWidget *parent = 0);
virtual ~KPrintPreview();
+ /**
+ * Returns true if the print preview system is available
+ * @since KDE 4.5
+ */
+ static bool isAvailable();
+
protected:
void showEvent(QShowEvent *event);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic