Changeset View
Changeset View
Standalone View
Standalone View
MainWindow/Window.cpp
Show First 20 Lines • Show All 270 Lines • ▼ Show 20 Line(s) | 269 | { | |||
---|---|---|---|---|---|
271 | ImportExport::Import::imageImport( importUrl ); | 271 | ImportExport::Import::imageImport( importUrl ); | ||
272 | qCInfo(TimingLog) << "MainWindow: imageImport:" << timer.restart() << "ms."; | 272 | qCInfo(TimingLog) << "MainWindow: imageImport:" << timer.restart() << "ms."; | ||
273 | } else { | 273 | } else { | ||
274 | // I need to postpone this otherwise the tip dialog will not get focus on start up | 274 | // I need to postpone this otherwise the tip dialog will not get focus on start up | ||
275 | KTipDialog::showTip( this ); | 275 | KTipDialog::showTip( this ); | ||
276 | } | 276 | } | ||
277 | 277 | | |||
278 | Exif::Database::instance(); // Load the database | 278 | Exif::Database::instance(); // Load the database | ||
279 | qCInfo(TimingLog) << "MainWindow: Loading EXIF DB:" << timer.restart() << "ms."; | 279 | qCInfo(TimingLog) << "MainWindow: Loading Exif DB:" << timer.restart() << "ms."; | ||
280 | 280 | | |||
281 | if (!Options::the()->listen().isNull()) | 281 | if (!Options::the()->listen().isNull()) | ||
282 | RemoteControl::RemoteInterface::instance().listen(Options::the()->listen()); | 282 | RemoteControl::RemoteInterface::instance().listen(Options::the()->listen()); | ||
283 | else if ( Settings::SettingsData::instance()->listenForAndroidDevicesOnStartup()) | 283 | else if ( Settings::SettingsData::instance()->listenForAndroidDevicesOnStartup()) | ||
284 | RemoteControl::RemoteInterface::instance().listen(); | 284 | RemoteControl::RemoteInterface::instance().listen(); | ||
285 | 285 | | |||
286 | announceAndroidVersion(); | 286 | announceAndroidVersion(); | ||
287 | } | 287 | } | ||
▲ Show 20 Lines • Show All 457 Lines • ▼ Show 20 Line(s) | 715 | { | |||
745 | // The Edit menu | 745 | // The Edit menu | ||
746 | m_copy = KStandardAction::copy( this, SLOT(slotCopySelectedURLs()), actionCollection() ); | 746 | m_copy = KStandardAction::copy( this, SLOT(slotCopySelectedURLs()), actionCollection() ); | ||
747 | m_paste = KStandardAction::paste( this, SLOT(slotPasteInformation()), actionCollection() ); | 747 | m_paste = KStandardAction::paste( this, SLOT(slotPasteInformation()), actionCollection() ); | ||
748 | m_paste->setEnabled(false); | 748 | m_paste->setEnabled(false); | ||
749 | m_selectAll = KStandardAction::selectAll( m_thumbnailView, SLOT(selectAll()), actionCollection() ); | 749 | m_selectAll = KStandardAction::selectAll( m_thumbnailView, SLOT(selectAll()), actionCollection() ); | ||
750 | KStandardAction::find( this, SLOT(slotSearch()), actionCollection() ); | 750 | KStandardAction::find( this, SLOT(slotSearch()), actionCollection() ); | ||
751 | 751 | | |||
752 | m_deleteSelected = actionCollection()->addAction(QString::fromLatin1("deleteSelected")); | 752 | m_deleteSelected = actionCollection()->addAction(QString::fromLatin1("deleteSelected")); | ||
753 | m_deleteSelected->setText( i18nc("Delete selected images", "Delete Selected" ) ); | 753 | m_deleteSelected->setText( i18nc("Delete selected images", "Delete Selected" ) ); | ||
pino: extra whitespace changes | |||||
754 | m_deleteSelected->setIcon( QIcon::fromTheme( QString::fromLatin1("edit-delete") ) ); | 754 | m_deleteSelected->setIcon( QIcon::fromTheme( QString::fromLatin1("edit-delete") ) ); | ||
755 | actionCollection()->setDefaultShortcut(m_deleteSelected, Qt::Key_Delete); | 755 | actionCollection()->setDefaultShortcut(m_deleteSelected, Qt::Key_Delete); | ||
756 | connect(m_deleteSelected, &QAction::triggered, this, &Window::slotDeleteSelected); | 756 | connect(m_deleteSelected, &QAction::triggered, this, &Window::slotDeleteSelected); | ||
757 | 757 | | |||
758 | a = actionCollection()->addAction(QString::fromLatin1("removeTokens"), this, SLOT(slotRemoveTokens())); | 758 | a = actionCollection()->addAction(QString::fromLatin1("removeTokens"), this, SLOT(slotRemoveTokens())); | ||
759 | a->setText( i18n("Remove Tokens...") ); | 759 | a->setText( i18n("Remove Tokens...") ); | ||
760 | 760 | | |||
761 | a = actionCollection()->addAction(QString::fromLatin1("showListOfFiles"), this, SLOT(slotShowListOfFiles())); | 761 | a = actionCollection()->addAction(QString::fromLatin1("showListOfFiles"), this, SLOT(slotShowListOfFiles())); | ||
▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Line(s) | 871 | #endif //DOES_STILL_NOT_WORK_IN_KPA4 | |||
877 | 877 | | |||
878 | a = actionCollection()->addAction( QString::fromLatin1("rescan"), DB::ImageDB::instance(), SLOT(slotRescan()) ); | 878 | a = actionCollection()->addAction( QString::fromLatin1("rescan"), DB::ImageDB::instance(), SLOT(slotRescan()) ); | ||
879 | a->setText( i18n("Rescan for Images and Videos") ); | 879 | a->setText( i18n("Rescan for Images and Videos") ); | ||
880 | 880 | | |||
881 | QAction* recreateExif = actionCollection()->addAction( QString::fromLatin1( "recreateExifDB" ), this, SLOT(slotRecreateExifDB()) ); | 881 | QAction* recreateExif = actionCollection()->addAction( QString::fromLatin1( "recreateExifDB" ), this, SLOT(slotRecreateExifDB()) ); | ||
882 | recreateExif->setText( i18n("Recreate Exif Search Database") ); | 882 | recreateExif->setText( i18n("Recreate Exif Search Database") ); | ||
883 | 883 | | |||
884 | QAction* rereadExif = actionCollection()->addAction( QString::fromLatin1("reReadExifInfo"), this, SLOT(slotReReadExifInfo()) ); | 884 | QAction* rereadExif = actionCollection()->addAction( QString::fromLatin1("reReadExifInfo"), this, SLOT(slotReReadExifInfo()) ); | ||
885 | rereadExif->setText( i18n("Read EXIF Info From Files...") ); | 885 | rereadExif->setText( i18n("Read Exif Info from Files...") ); | ||
pino: "from" | |||||
886 | 886 | | |||
887 | m_sortAllByDateAndTime = actionCollection()->addAction( QString::fromLatin1("sortAllImages"), this, SLOT(slotSortAllByDateAndTime()) ); | 887 | m_sortAllByDateAndTime = actionCollection()->addAction( QString::fromLatin1("sortAllImages"), this, SLOT(slotSortAllByDateAndTime()) ); | ||
888 | m_sortAllByDateAndTime->setText( i18n("Sort All by Date && Time") ); | 888 | m_sortAllByDateAndTime->setText( i18n("Sort All by Date && Time") ); | ||
889 | m_sortAllByDateAndTime->setEnabled(true); | 889 | m_sortAllByDateAndTime->setEnabled(true); | ||
890 | 890 | | |||
891 | m_AutoStackImages = actionCollection()->addAction( QString::fromLatin1( "autoStack" ), this, SLOT (slotAutoStackImages()) ); | 891 | m_AutoStackImages = actionCollection()->addAction( QString::fromLatin1( "autoStack" ), this, SLOT (slotAutoStackImages()) ); | ||
892 | m_AutoStackImages->setText( i18n("Automatically Stack Selected Images...") ); | 892 | m_AutoStackImages->setText( i18n("Automatically Stack Selected Images...") ); | ||
893 | 893 | | |||
▲ Show 20 Lines • Show All 388 Lines • ▼ Show 20 Line(s) | 1278 | { | |||
1282 | dialog->addCollection( viewer->actions(), i18n("Viewer") ); | 1282 | dialog->addCollection( viewer->actions(), i18n("Viewer") ); | ||
1283 | 1283 | | |||
1284 | #ifdef HASKIPI | 1284 | #ifdef HASKIPI | ||
1285 | loadPlugins(); | 1285 | loadPlugins(); | ||
1286 | Q_FOREACH( const KIPI::PluginLoader::Info *pluginInfo, m_pluginLoader->pluginList() ) { | 1286 | Q_FOREACH( const KIPI::PluginLoader::Info *pluginInfo, m_pluginLoader->pluginList() ) { | ||
1287 | KIPI::Plugin* plugin = pluginInfo->plugin(); | 1287 | KIPI::Plugin* plugin = pluginInfo->plugin(); | ||
1288 | if ( plugin ) | 1288 | if ( plugin ) | ||
1289 | dialog->addCollection( plugin->actionCollection(), | 1289 | dialog->addCollection( plugin->actionCollection(), | ||
1290 | i18nc("Add 'Plugin' prefix so that KIPI plugins are obvious in KShortcutsDialog…","Plugin: %1", pluginInfo->name()) ); | 1290 | i18nc("Add 'Plugin' prefix so that KIPI plugins are obvious in KShortcutsDialog…","Plugin: %1", pluginInfo->name()) ); | ||
pino: extra whitespace changes | |||||
1291 | } | 1291 | } | ||
1292 | #endif | 1292 | #endif | ||
1293 | 1293 | | |||
1294 | createAnnotationDialog(); | 1294 | createAnnotationDialog(); | ||
1295 | dialog->addCollection( m_annotationDialog->actions(), i18n("Annotation Dialog" ) ); | 1295 | dialog->addCollection( m_annotationDialog->actions(), i18n("Annotation Dialog" ) ); | ||
1296 | 1296 | | |||
1297 | dialog->configure(); | 1297 | dialog->configure(); | ||
1298 | 1298 | | |||
▲ Show 20 Lines • Show All 548 Lines • ▼ Show 20 Line(s) | |||||
1847 | 1847 | | |||
1848 | void MainWindow::Window::slotThumbnailSizeChanged() | 1848 | void MainWindow::Window::slotThumbnailSizeChanged() | ||
1849 | { | 1849 | { | ||
1850 | QString thumbnailSizeMsg = i18nc( "@info:status", | 1850 | QString thumbnailSizeMsg = i18nc( "@info:status", | ||
1851 | //xgettext:no-c-format | 1851 | //xgettext:no-c-format | ||
1852 | "Thumbnail width: %1px (storage size: %2px)", | 1852 | "Thumbnail width: %1px (storage size: %2px)", | ||
1853 | Settings::SettingsData::instance()->actualThumbnailSize(), | 1853 | Settings::SettingsData::instance()->actualThumbnailSize(), | ||
1854 | Settings::SettingsData::instance()->thumbnailSize() | 1854 | Settings::SettingsData::instance()->thumbnailSize() | ||
1855 | ); | 1855 | ); | ||
1856 | m_statusBar->showMessage( thumbnailSizeMsg, 4000); | 1856 | m_statusBar->showMessage( thumbnailSizeMsg, 4000); | ||
pino: extra whitespace/indentation changes | |||||
1857 | } | 1857 | } | ||
1858 | 1858 | | |||
1859 | void MainWindow::Window::createSarchBar() | 1859 | void MainWindow::Window::createSarchBar() | ||
1860 | { | 1860 | { | ||
1861 | // Set up the search tool bar | 1861 | // Set up the search tool bar | ||
1862 | SearchBar* bar = new SearchBar( this ); | 1862 | SearchBar* bar = new SearchBar( this ); | ||
1863 | bar->setLineEditEnabled(false); | 1863 | bar->setLineEditEnabled(false); | ||
1864 | bar->setObjectName(QString::fromUtf8("searchBar")); | 1864 | bar->setObjectName(QString::fromUtf8("searchBar")); | ||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |
extra whitespace changes