r19610 by craig - #12732: add image location and name to tooltip, and a button to jump to the location in the location browser
scribus-commit
scribus-commit at lists.scribus.net
Wed Oct 22 21:59:16 UTC 2014
Author: craig
Date: Wed Oct 22 21:59:16 2014
New Revision: 19610
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19610
Log:
#12732: add image location and name to tooltip, and a button to jump to the location in the location browser
Modified:
trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h
trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.ui
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19610&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp Wed Oct 22 21:59:16 2014
@@ -154,6 +154,7 @@
connect ( collectionsSetTagsButton, SIGNAL ( clicked() ), this, SLOT ( collectionsSetTagsButtonClicked() ) );
connect ( collectionsAddNewTagButton, SIGNAL ( clicked() ), this, SLOT ( collectionsAddNewTagButtonClicked() ) );
+ connect (jumpToImageButton, SIGNAL(clicked()), this, SLOT(jumpToImageFolder()));
collectionsWidget->setColumnCount ( 1 );
collectionsWidget->setHeaderLabels ( QStringList ( "Name" ) );
@@ -1436,13 +1437,32 @@
QString newTag = collectionsAddNewTagLineedit->text();
if ( !newTag.isEmpty() )
- {
collectionsTagImagesCombobox->addItem ( newTag, 1 );
- }
else
- {
ScMessageBox::warning ( this, tr ( "Picture Browser Error" ), tr ( "No tag entered" ) );
- }
+}
+
+void PictureBrowser::jumpToImageFolder()
+{
+ QString searchDir = informationFilepathLabel->text();
+ QDir dir ( searchDir );
+
+ if (!dir.exists())
+ return;
+
+ currPath = searchDir;
+
+ if (!fit)
+ {
+ fit = new findImagesThread ( currPath, nameFilters, QDir::Name, true );
+ connect ( fit, SIGNAL ( finished() ), this, SLOT ( findImagesThreadFinished() ) );
+ fit->start();
+ }
+ else
+ {
+ fit->restart();
+ }
+ navigationBox->setCurrentIndex(0);
}
@@ -1735,6 +1755,8 @@
informationFilepathLabel->setText ( tmpImage->fileInformation.absolutePath() );
informationFilesizeLabel->setText ( QString ( "%1 Bytes" ).arg ( tmpImage->fileInformation.size() ) );
informationFiledateLabel->setText ( tmpImage->fileInformation.lastModified().toString ( "dd.MM.yyyy hh:mm:ss" ) );
+ informationFilepathLabel->setToolTip(tmpImage->fileInformation.absoluteFilePath());
+
if(tmpImage->previewImageLoading)
informationFilenameLabel->setText (tr("Image still loading"));
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19610&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h Wed Oct 22 21:59:16 2014
@@ -195,6 +195,7 @@
void previewImageSelectionChanged ( const QItemSelection & selected, const QItemSelection & deselected );
void collectionsSetTagsButtonClicked();
void collectionsAddNewTagButtonClicked();
+ void jumpToImageFolder();
private:
//updates the QListView when the set of previewimages was changed (new images, zoom, previewmode changed etc)
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19610&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.ui
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.ui (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.ui Wed Oct 22 21:59:16 2014
@@ -906,7 +906,7 @@
</size>
</property>
<property name="currentIndex">
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
@@ -925,6 +925,27 @@
<string>File</string>
</property>
<layout class="QGridLayout">
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_11">
+ <property name="text">
+ <string>Path:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QLabel" name="informationFiledateLabel">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_22">
+ <property name="text">
+ <string>Size:</string>
+ </property>
+ </widget>
+ </item>
<item row="0" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
@@ -932,6 +953,20 @@
</property>
</widget>
</item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_23">
+ <property name="text">
+ <string>Date:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QLabel" name="informationFilesizeLabel">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
<item row="0" column="1">
<widget class="QLabel" name="informationFilenameLabel">
<property name="text">
@@ -939,45 +974,29 @@
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_11">
- <property name="text">
- <string>Path:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
+ <item row="2" column="1">
<widget class="QLabel" name="informationFilepathLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_22">
- <property name="text">
- <string>Size:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="informationFilesizeLabel">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_23">
- <property name="text">
- <string>Date:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="informationFiledateLabel">
- <property name="text">
- <string/>
+ <item row="2" column="2">
+ <widget class="QPushButton" name="jumpToImageButton">
+ <property name="minimumSize">
+ <size>
+ <width>23</width>
+ <height>23</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>23</width>
+ <height>23</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Go</string>
</property>
</widget>
</item>
More information about the scribus-commit
mailing list