mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
a bit more icons
This commit is contained in:
parent
b83c806c62
commit
bfe7f720da
|
@ -21,19 +21,21 @@ EditDictionaries::EditDictionaries( QWidget * parent, Config::Class & cfg_,
|
|||
{
|
||||
ui.setupUi( this );
|
||||
|
||||
setWindowIcon( QIcon(":/icons/book.png") );
|
||||
|
||||
ui.tabs->clear();
|
||||
|
||||
ui.tabs->addTab( &sources, tr( "&Sources" ) );
|
||||
ui.tabs->addTab( groups.get(), tr( "&Groups" ) );
|
||||
|
||||
ui.tabs->addTab( &sources, QIcon(":/icons/book.png"), tr( "&Sources" ) );
|
||||
ui.tabs->addTab( groups.get(), QIcon(":/icons/bookcase.png"), tr( "&Groups" ) );
|
||||
}
|
||||
|
||||
|
||||
void EditDictionaries::accept()
|
||||
{
|
||||
acceptChangedSources();
|
||||
|
||||
|
||||
Config::Groups newGroups = groups->getGroups();
|
||||
|
||||
|
||||
if ( origCfg.groups != newGroups )
|
||||
{
|
||||
groupsChanged = true;
|
||||
|
@ -56,15 +58,15 @@ void EditDictionaries::on_tabs_currentChanged( int index )
|
|||
if ( isSourcesChanged() )
|
||||
{
|
||||
ui.tabs->setCurrentIndex( 0 );
|
||||
|
||||
|
||||
QMessageBox question( QMessageBox::Question, tr( "Sources changed" ),
|
||||
tr( "Some sources were changed. Would you like to accept the changes?" ),
|
||||
QMessageBox::NoButton, this );
|
||||
|
||||
QPushButton * accept = question.addButton( tr( "Accept" ), QMessageBox::AcceptRole );
|
||||
|
||||
|
||||
question.addButton( tr( "Cancel" ), QMessageBox::RejectRole );
|
||||
|
||||
|
||||
question.exec();
|
||||
|
||||
if ( question.clickedButton() == accept )
|
||||
|
@ -72,7 +74,7 @@ void EditDictionaries::on_tabs_currentChanged( int index )
|
|||
acceptChangedSources();
|
||||
|
||||
// Rebuild groups from scratch
|
||||
|
||||
|
||||
Config::Groups savedGroups = groups->getGroups();
|
||||
|
||||
ui.tabs->setUpdatesEnabled( false );
|
||||
|
@ -81,7 +83,7 @@ void EditDictionaries::on_tabs_currentChanged( int index )
|
|||
groups = new Groups( this, dictionaries, savedGroups );
|
||||
ui.tabs->insertTab( 1, groups.get(), tr( "&Groups" ) );
|
||||
ui.tabs->setUpdatesEnabled( true );
|
||||
|
||||
|
||||
lastCurrentTab = index;
|
||||
ui.tabs->setCurrentIndex( index );
|
||||
}
|
||||
|
@ -110,7 +112,7 @@ void EditDictionaries::acceptChangedSources()
|
|||
if ( isSourcesChanged() )
|
||||
{
|
||||
dictionariesChanged = true;
|
||||
|
||||
|
||||
cfg.paths = sources.getPaths();
|
||||
cfg.soundDirs = sources.getSoundDirs();
|
||||
cfg.hunspell = sources.getHunspell();
|
||||
|
|
BIN
src/icons/book.png
Normal file
BIN
src/icons/book.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
BIN
src/icons/bookcase.png
Normal file
BIN
src/icons/bookcase.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
BIN
src/icons/configure.png
Normal file
BIN
src/icons/configure.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
src/icons/hotkeys.png
Normal file
BIN
src/icons/hotkeys.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
src/icons/interface.png
Normal file
BIN
src/icons/interface.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
src/icons/network.png
Normal file
BIN
src/icons/network.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -61,9 +61,11 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
|||
navBack = navToolbar->addAction( QIcon( ":/icons/previous.png" ), tr( "Back" ) );
|
||||
navForward = navToolbar->addAction( QIcon( ":/icons/next.png" ), tr( "Forward" ) );
|
||||
|
||||
navToolbar->addSeparator();
|
||||
navToolbar->addAction( ui.print );
|
||||
navToolbar->addAction( ui.saveArticle );
|
||||
|
||||
navToolbar->addSeparator();
|
||||
enableScanPopup = navToolbar->addAction( QIcon( ":/icons/wizard.png" ), tr( "Scan Popup" ) );
|
||||
enableScanPopup->setCheckable( true );
|
||||
enableScanPopup->setVisible( cfg.preferences.enableScanPopup );
|
||||
|
@ -1241,9 +1243,9 @@ void MainWindow::on_printPreview_activated()
|
|||
void MainWindow::on_print_activated()
|
||||
{
|
||||
QPrintDialog dialog( &printer, this );
|
||||
|
||||
|
||||
dialog.setWindowTitle( tr( "Print Article") );
|
||||
|
||||
|
||||
if ( dialog.exec() != QDialog::Accepted )
|
||||
return;
|
||||
|
||||
|
@ -1266,15 +1268,15 @@ void MainWindow::on_saveArticle_activated()
|
|||
QFileDialog fileDialog( this, tr( "Save Article As" ), QString(), tr( "Html files (*.html *.htm)" ) );
|
||||
|
||||
fileDialog.setAcceptMode( QFileDialog::AcceptSave );
|
||||
|
||||
|
||||
fileDialog.setDefaultSuffix( "html" );
|
||||
|
||||
|
||||
fileDialog.selectFile( view.getTitle() + ".html" );
|
||||
|
||||
if ( fileDialog.exec() && fileDialog.selectedFiles().size() == 1 )
|
||||
{
|
||||
QString fileName = fileDialog.selectedFiles().front();
|
||||
|
||||
|
||||
QFile file( fileName );
|
||||
|
||||
if ( !file.open( QIODevice::WriteOnly ) )
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>653</width>
|
||||
<height>26</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
|
@ -223,6 +223,10 @@
|
|||
</widget>
|
||||
</widget>
|
||||
<action name="dictionaries">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/book.png</normaloff>:/icons/book.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Dictionaries...</string>
|
||||
</property>
|
||||
|
@ -231,6 +235,10 @@
|
|||
</property>
|
||||
</action>
|
||||
<action name="groups">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/playsound.png</normaloff>:/icons/playsound.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Groups...</string>
|
||||
</property>
|
||||
|
@ -239,6 +247,10 @@
|
|||
</property>
|
||||
</action>
|
||||
<action name="preferences">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Preferences...</string>
|
||||
</property>
|
||||
|
@ -291,7 +303,7 @@
|
|||
</action>
|
||||
<action name="saveArticle">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/filesave.png</normaloff>:/icons/filesave.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -306,7 +318,7 @@
|
|||
</action>
|
||||
<action name="print">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/icons/print.png</normaloff>:/icons/print.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -339,8 +351,6 @@
|
|||
<tabstop>translateLine</tabstop>
|
||||
<tabstop>tabWidget</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="resources.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -6,13 +6,17 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>435</width>
|
||||
<width>472</width>
|
||||
<height>325</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Preferences</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
@ -20,9 +24,13 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/icons/interface.png</normaloff>:/icons/interface.png</iconset>
|
||||
</attribute>
|
||||
<attribute name="title">
|
||||
<string>&Interface</string>
|
||||
</attribute>
|
||||
|
@ -198,6 +206,10 @@ the application.</string>
|
|||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_5">
|
||||
<attribute name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/icons/hotkeys.png</normaloff>:/icons/hotkeys.png</iconset>
|
||||
</attribute>
|
||||
<attribute name="title">
|
||||
<string>Hotkeys</string>
|
||||
</attribute>
|
||||
|
@ -319,6 +331,10 @@ the application.</string>
|
|||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
<attribute name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/icons/wizard.png</normaloff>:/icons/wizard.png</iconset>
|
||||
</attribute>
|
||||
<attribute name="title">
|
||||
<string>&Scan Popup</string>
|
||||
</attribute>
|
||||
|
@ -613,6 +629,10 @@ seconds, which is specified here.</string>
|
|||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/icons/playsound.png</normaloff>:/icons/playsound.png</iconset>
|
||||
</attribute>
|
||||
<attribute name="title">
|
||||
<string>&Audio</string>
|
||||
</attribute>
|
||||
|
@ -674,6 +694,10 @@ seconds, which is specified here.</string>
|
|||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/icons/network.png</normaloff>:/icons/network.png</iconset>
|
||||
</attribute>
|
||||
<attribute name="title">
|
||||
<string>&Network</string>
|
||||
</attribute>
|
||||
|
@ -880,7 +904,9 @@ download page.</string>
|
|||
<tabstop>proxyPassword</tabstop>
|
||||
<tabstop>enableScanPopup</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="resources.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
|
|
|
@ -1,32 +1,38 @@
|
|||
<RCC>
|
||||
<qresource prefix="/" >
|
||||
<file>icons/print.png</file>
|
||||
<file>icons/arrow.png</file>
|
||||
<file>icons/prefix.png</file>
|
||||
<file>icons/pushpin.png</file>
|
||||
<file>icons/playsound.png</file>
|
||||
<file>icons/closetab.png</file>
|
||||
<file>icons/addtab.png</file>
|
||||
<file>icons/next.png</file>
|
||||
<file>icons/previous.png</file>
|
||||
<file>icons/programicon.png</file>
|
||||
<file>icons/programicon_scan.png</file>
|
||||
<file>icons/wizard.png</file>
|
||||
<file>icons/warning.png</file>
|
||||
<file>article-style.css</file>
|
||||
<file>article-style-print.css</file>
|
||||
<file>qt-style.css</file>
|
||||
<file>icons/icon32_dsl.png</file>
|
||||
<file>icons/icon32_stardict.png</file>
|
||||
<file>icons/icon32_xdxf.png</file>
|
||||
<file>icons/icon32_bgl.png</file>
|
||||
<file>icons/icon32_dictd.png</file>
|
||||
<file>icons/icon32_hunspell.png</file>
|
||||
<file>icons/fileopen.png</file>
|
||||
<file>icons/filesave.png</file>
|
||||
<file>icons/icon32_wiki.png</file>
|
||||
<file>icons/icon32_zoombase.png</file>
|
||||
<file>icons/icon32_zoomin.png</file>
|
||||
<file>icons/icon32_zoomout.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/" >
|
||||
<file>icons/print.png</file>
|
||||
<file>icons/arrow.png</file>
|
||||
<file>icons/prefix.png</file>
|
||||
<file>icons/pushpin.png</file>
|
||||
<file>icons/playsound.png</file>
|
||||
<file>icons/closetab.png</file>
|
||||
<file>icons/addtab.png</file>
|
||||
<file>icons/next.png</file>
|
||||
<file>icons/previous.png</file>
|
||||
<file>icons/programicon.png</file>
|
||||
<file>icons/programicon_scan.png</file>
|
||||
<file>icons/wizard.png</file>
|
||||
<file>icons/warning.png</file>
|
||||
<file>article-style.css</file>
|
||||
<file>article-style-print.css</file>
|
||||
<file>qt-style.css</file>
|
||||
<file>icons/icon32_dsl.png</file>
|
||||
<file>icons/icon32_stardict.png</file>
|
||||
<file>icons/icon32_xdxf.png</file>
|
||||
<file>icons/icon32_bgl.png</file>
|
||||
<file>icons/icon32_dictd.png</file>
|
||||
<file>icons/icon32_hunspell.png</file>
|
||||
<file>icons/fileopen.png</file>
|
||||
<file>icons/filesave.png</file>
|
||||
<file>icons/icon32_wiki.png</file>
|
||||
<file>icons/icon32_zoombase.png</file>
|
||||
<file>icons/icon32_zoomin.png</file>
|
||||
<file>icons/icon32_zoomout.png</file>
|
||||
<file>icons/network.png</file>
|
||||
<file>icons/hotkeys.png</file>
|
||||
<file>icons/interface.png</file>
|
||||
<file>icons/configure.png</file>
|
||||
<file>icons/book.png</file>
|
||||
<file>icons/bookcase.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Loading…
Reference in a new issue