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;
|
static GermanTable t;
|
||||||
|
|
||||||
return new Transliteration::TransliterationDictionary( "cf1b74acd98adea9b2bba16af38f1081",
|
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;
|
static HepburnHiragana t;
|
||||||
|
|
||||||
result.push_back( new Transliteration::TransliterationDictionary( "94eae5a5aaf5b0a900490f4d6b36aac0",
|
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 )
|
if ( r.enableKatakana )
|
||||||
|
@ -95,7 +96,8 @@ vector< sptr< Dictionary::Class > > makeDictionaries( Config::Romaji const & r )
|
||||||
static HepburnKatakana t;
|
static HepburnKatakana t;
|
||||||
|
|
||||||
result.push_back( new Transliteration::TransliterationDictionary( "3252a35767d3f6e85e3e39069800dd2f",
|
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;
|
static RussianTable t;
|
||||||
|
|
||||||
return new Transliteration::TransliterationDictionary( "cf1b74acd98adea9b2bba16af38f1086",
|
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">
|
<property name="text">
|
||||||
<string>Russian transliteration</string>
|
<string>Russian transliteration</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="flags.qrc">
|
||||||
|
<normaloff>:/flags/ru.png</normaloff>:/flags/ru.png</iconset>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -377,6 +381,10 @@ of the appropriate groups to use them.</string>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>German transliteration</string>
|
<string>German transliteration</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="flags.qrc">
|
||||||
|
<normaloff>:/flags/de.png</normaloff>:/flags/de.png</iconset>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -521,6 +529,7 @@ Standardized as ISO 3602</string>
|
||||||
<tabstop>paths</tabstop>
|
<tabstop>paths</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
<include location="flags.qrc"/>
|
||||||
<include location="resources.qrc"/>
|
<include location="resources.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|
|
@ -22,10 +22,11 @@ void Table::ins( char const * from, char const * to )
|
||||||
|
|
||||||
TransliterationDictionary::TransliterationDictionary( string const & id,
|
TransliterationDictionary::TransliterationDictionary( string const & id,
|
||||||
string const & name_,
|
string const & name_,
|
||||||
|
QIcon icon_,
|
||||||
Table const & table_,
|
Table const & table_,
|
||||||
bool caseSensitive_ ):
|
bool caseSensitive_ ):
|
||||||
Dictionary::Class( id, vector< string >() ),
|
Dictionary::Class( id, vector< string >() ),
|
||||||
name( name_ ), table( table_ ),
|
name( name_ ), icon( icon_ ), table( table_ ),
|
||||||
caseSensitive( caseSensitive_ )
|
caseSensitive( caseSensitive_ )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
@ -37,17 +37,22 @@ protected:
|
||||||
class TransliterationDictionary: public Dictionary::Class
|
class TransliterationDictionary: public Dictionary::Class
|
||||||
{
|
{
|
||||||
string name;
|
string name;
|
||||||
|
QIcon icon;
|
||||||
Table const & table;
|
Table const & table;
|
||||||
bool caseSensitive;
|
bool caseSensitive;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TransliterationDictionary( string const & id, string const & name,
|
TransliterationDictionary( string const & id, string const & name,
|
||||||
|
QIcon icon,
|
||||||
Table const & table,
|
Table const & table,
|
||||||
bool caseSensitive = true );
|
bool caseSensitive = true );
|
||||||
|
|
||||||
virtual string getName() throw();
|
virtual string getName() throw();
|
||||||
|
|
||||||
|
virtual QIcon getIcon() throw()
|
||||||
|
{ return icon; }
|
||||||
|
|
||||||
virtual map< Dictionary::Property, string > getProperties() throw();
|
virtual map< Dictionary::Property, string > getProperties() throw();
|
||||||
|
|
||||||
virtual unsigned long getArticleCount() throw();
|
virtual unsigned long getArticleCount() throw();
|
||||||
|
|
Loading…
Reference in a new issue