mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
+ Add icons for transliterations.
This commit is contained in:
parent
ecc3d39fdb
commit
8daa82e21f
|
@ -45,7 +45,8 @@ sptr< Dictionary::Class > makeDictionary() throw( std::exception )
|
|||
static GermanTable t;
|
||||
|
||||
return new Transliteration::TransliterationDictionary( "cf1b74acd98adea9b2bba16af38f1081",
|
||||
QCoreApplication::translate( "GermanTranslit", "German Transliteration" ).toUtf8().data(), t );
|
||||
QCoreApplication::translate( "GermanTranslit", "German Transliteration" ).toUtf8().data(),
|
||||
QIcon( ":/flags/de.png" ), t );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -87,7 +87,8 @@ vector< sptr< Dictionary::Class > > makeDictionaries( Config::Romaji const & r )
|
|||
static HepburnHiragana t;
|
||||
|
||||
result.push_back( new Transliteration::TransliterationDictionary( "94eae5a5aaf5b0a900490f4d6b36aac0",
|
||||
QCoreApplication::translate( "Romaji", "Hepburn Romaji for Hiragana" ).toUtf8().data(), t, false ) );
|
||||
QCoreApplication::translate( "Romaji", "Hepburn Romaji for Hiragana" ).toUtf8().data(),
|
||||
QIcon( ":/flags/jp.png" ), t, false ) );
|
||||
}
|
||||
|
||||
if ( r.enableKatakana )
|
||||
|
@ -95,7 +96,8 @@ vector< sptr< Dictionary::Class > > makeDictionaries( Config::Romaji const & r )
|
|||
static HepburnKatakana t;
|
||||
|
||||
result.push_back( new Transliteration::TransliterationDictionary( "3252a35767d3f6e85e3e39069800dd2f",
|
||||
QCoreApplication::translate( "Romaji", "Hepburn Romaji for Katakana" ).toUtf8().data(), t, false ) );
|
||||
QCoreApplication::translate( "Romaji", "Hepburn Romaji for Katakana" ).toUtf8().data(),
|
||||
QIcon( ":/flags/jp.png" ), t, false ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,8 @@ sptr< Dictionary::Class > makeDictionary() throw( std::exception )
|
|||
static RussianTable t;
|
||||
|
||||
return new Transliteration::TransliterationDictionary( "cf1b74acd98adea9b2bba16af38f1086",
|
||||
QCoreApplication::translate( "RussianTranslit", "Russian Transliteration" ).toUtf8().data(), t );
|
||||
QCoreApplication::translate( "RussianTranslit", "Russian Transliteration" ).toUtf8().data(),
|
||||
QIcon( ":/flags/ru.png" ), t );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -357,6 +357,10 @@ of the appropriate groups to use them.</string>
|
|||
<property name="text">
|
||||
<string>Russian transliteration</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="flags.qrc">
|
||||
<normaloff>:/flags/ru.png</normaloff>:/flags/ru.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -377,6 +381,10 @@ of the appropriate groups to use them.</string>
|
|||
<property name="text">
|
||||
<string>German transliteration</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="flags.qrc">
|
||||
<normaloff>:/flags/de.png</normaloff>:/flags/de.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -521,6 +529,7 @@ Standardized as ISO 3602</string>
|
|||
<tabstop>paths</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="flags.qrc"/>
|
||||
<include location="resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
|
|
|
@ -22,10 +22,11 @@ void Table::ins( char const * from, char const * to )
|
|||
|
||||
TransliterationDictionary::TransliterationDictionary( string const & id,
|
||||
string const & name_,
|
||||
QIcon icon_,
|
||||
Table const & table_,
|
||||
bool caseSensitive_ ):
|
||||
Dictionary::Class( id, vector< string >() ),
|
||||
name( name_ ), table( table_ ),
|
||||
name( name_ ), icon( icon_ ), table( table_ ),
|
||||
caseSensitive( caseSensitive_ )
|
||||
{}
|
||||
|
||||
|
|
|
@ -37,17 +37,22 @@ protected:
|
|||
class TransliterationDictionary: public Dictionary::Class
|
||||
{
|
||||
string name;
|
||||
QIcon icon;
|
||||
Table const & table;
|
||||
bool caseSensitive;
|
||||
|
||||
public:
|
||||
|
||||
TransliterationDictionary( string const & id, string const & name,
|
||||
QIcon icon,
|
||||
Table const & table,
|
||||
bool caseSensitive = true );
|
||||
|
||||
virtual string getName() throw();
|
||||
|
||||
virtual QIcon getIcon() throw()
|
||||
{ return icon; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw();
|
||||
|
||||
virtual unsigned long getArticleCount() throw();
|
||||
|
|
Loading…
Reference in a new issue