Changeset 2838e4d


Ignore:
Timestamp:
11/28/14 02:17:20 (2 months ago)
Author:
yurkis <yurkis@…>
Branches:
master, releng/10.1.1
Children:
ea582bf
Parents:
05fad87
Message:

Keyboard settings: last changes before upstream merge

Location:
src-qt4/pc-syskeyboard
Files:
1 added
15 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-syskeyboard/dialogs/kblayoutselectdialog.cpp

    rbcd9dd1 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#include "kblayoutselectdialog.h" 
    226#include "ui_kblayoutselectdialog.h" 
  • src-qt4/pc-syskeyboard/dialogs/kblayoutselectdialog.h

    rbcd9dd1 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#ifndef KBLAYOUTSELECTDIALOG_H 
    226#define KBLAYOUTSELECTDIALOG_H 
     
    1842    ~KbLayoutSelectDialog(); 
    1943 
     44    //! Disable somre layouts in list 
    2045    void disableLayouts(QStringList lv); 
     46    //! Set current selected layout in list 
    2147    void setCurrent(QString layout_id); 
     48    //! Get layout selected by user 
    2249    pcbsd::keyboard::SLayout selectedLayout(); 
    2350     
  • src-qt4/pc-syskeyboard/keyboardsettings.cpp

    r3d9f9d4 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#include "keyboardsettings.h" 
    226 
  • src-qt4/pc-syskeyboard/keyboardsettings.h

    r47491b4 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#ifndef KEYBOARDSETTINGS_H 
    226#define KEYBOARDSETTINGS_H 
     
    933namespace keyboard 
    1034{ 
     35    //! Keyboard layout definition 
    1136    typedef struct SLayout 
    1237    { 
    13         QString layout_id; 
    14         QString variant_id; 
     38        QString layout_id; ///< Layout identificator 
     39        QString variant_id; ///< Variant identificator 
    1540 
    1641        SLayout(){;} 
     
    2146            return (layout_id == l.layout_id) && (variant_id == l.variant_id); 
    2247        } 
     48 
     49        //! Get full layout name in format 'layout(variant)' 
    2350        QString fullName() 
    2451        { 
     
    2855        } 
    2956 
     57        //! True if not initialized 
    3058        bool isEmpty() 
    3159        { 
     
    3462    }Layout; 
    3563 
     64    //! Vector of layouts type 
    3665    typedef QVector<Layout> LayoutsVector; 
    3766 
     67    //! Keyboard option definition 
    3868    typedef struct SOption 
    3969    { 
    40         QString group_name; 
    41         QString option;         
     70        QString group_name; ///< Options group name 
     71        QString option;     ///< Option name 
    4272 
    4373 
    4474        SOption(){;} 
    4575        SOption(QString grp, QString opt):group_name(grp),option(opt){;} 
     76 
     77        //! Initializer. You may use format 'group:option' string 
    4678        SOption(QString fullName) 
    4779        { 
     
    5486        } 
    5587 
     88        //! True if not initialized 
    5689        bool isEmpty() 
    5790        { 
     
    5992        } 
    6093 
     94        //! Get full option name in format 'group:option' 
    6195        QString fullName() 
    6296        { 
     
    66100    }Option; 
    67101 
     102    //! Vector of keyboard option type 
    68103    typedef QVector<Option> OptionsVector; 
    69104 
     105    //! Class that holds complete keyboard settings 
    70106    class KeyboardSettings 
    71107    { 
    72108      public: 
     109        //! Get keyboard model name 
    73110        QString keyboardModel(); 
     111        //! Set keyboard model name 
    74112        void setKeyboardModel(QString kb_model); 
    75113 
     114        //! Get cont of layouts 
    76115        int layoutsCount(); 
     116        //! Get layout by index 
    77117        Layout layout(int idx); 
     118        //! Get layout by string ID 
    78119        Layout layout(QString layout_id); 
     120        //! True if settings has some layout 
    79121        bool hasLayout(Layout l); 
     122        //! True if settings has some string layout ID 
    80123        bool hasLayout(QString layout_id); 
     124        //! Remove all layouts 
    81125        void clearLayouts(); 
     126        //! Add layout 
    82127        void addLayout(Layout l); 
     128        //! Remove layout by string layout ID 
    83129        void removeLayout(QString layout_id); 
     130        //! Remove layout 
    84131        void removeLayout(Layout l); 
     132        //! Set layouts directly 
    85133        void setLayouts(LayoutsVector lv); 
    86134 
     135        //! Get cont of options in this settings 
    87136        int optionsCount(); 
     137        //! Get option by index 
    88138        Option option(int idx); 
     139        //! True if settings has option 
    89140        bool hasOption(Option opt); 
     141        //! Remove all options 
    90142        void clearOptions(); 
     143        //! Add new option to the settings 
    91144        void addOption(Option opt); 
     145        //! Remove option from settings 
    92146        void removeOption(Option opt); 
     147        //! Set options directly 
    93148        void setOptions(OptionsVector ov); 
    94149 
     150        //! Get string for setxkbmap -layout flag 
    95151        QString layoutsAsString(); 
     152        //! Get string fro setxkbmap -variant flag 
    96153        QString variantsAsString(); 
     154        //! Get string fro setxkbmap -option flag 
    97155        QString optionsAsString(); 
     156        //! Get complete options string for setxkbmap calling 
    98157        QString xkbString(); 
    99158 
     
    104163    }; 
    105164 
     165    //! 'Changing layout by Alt + Shift' option 
    106166    const Option OPTION_SWITCH_ALT_SHIFT ("grp", "alt_shift_toggle"); 
     167    //! 'Changing layout by Ctrl + Shift' option 
    107168    const Option OPTION_SWITCH_CTRL_SHIFT ("grp", "ctrl_shift_toggle"); 
     169    //! 'Changing layout by Alt + Space' option 
    108170    const Option OPTION_SWITCH_ALT_SPACE ("grp", "alt_space_toggle"); 
     171    //! 'Allow terminate X by pressing Ctrl+Alt+Backspace' option 
    109172    const Option OPTION_ALLOW_TERMINATE_X ("terminate", "ctrl_alt_bksp"); 
    110173 
     174    //! Get current keyboard settings 
    111175    KeyboardSettings currentSettings(); 
    112176 
     177    //! Apply (but not save) keyboard settings 
    113178    void applySettings(KeyboardSettings cs); 
    114179 
     180    //! Get all of possible keyboard layout id 
    115181    QStringList possibleLayouts(); 
     182    //! Get all of possible variant id for some layout 
    116183    QStringList possibleVariants(QString layout_id); 
     184    //! Get all of possible keyboard model id 
    117185    QStringList possibleModels(); 
     186    //! Get all of possible option group id 
    118187    QStringList possibleOptionGroups(); 
     188    //! Get all of possible option id for some group 
    119189    QStringList possibleOptions(QString group_id); 
    120190 
     191    //! Get keyboard model description by keyboard model id (\see possibleModels() \see KeyboardSettings::keyboardModel()) 
    121192    QString modelDescription(QString model); 
     193    //! Get layout description by layout id 
    122194    QString layoutDescription(QString id); 
     195    //! Get variant description by layout id and variant id 
    123196    QString variantDescription(QString layout_id, QString variant_id); 
     197    //! Get options group description by options group id 
    124198    QString optionGroupDescription(QString grp_id); 
    125     QString optionDescription(QString grp_id, QString option_id);     
     199    //! Get option description by options group id and option id 
     200    QString optionDescription(QString grp_id, QString option_id); 
    126201 
    127202}} 
  • src-qt4/pc-syskeyboard/main.cpp

    rfd960c7 r2838e4d  
    22#include <QApplication> 
    33 
     4#include "pcbsd-ui.h" 
     5 
    46int main(int argc, char *argv[]) 
    57{ 
    6     QApplication a(argc, argv); 
     8    PCSingleApplication a(argc,argv,"pc-syskeyboard"); 
     9 
     10    if ( a.isRunning() ) 
     11                  return !(a.sendMessage("show")); 
     12 
     13    QTranslator translator; 
     14    QLocale mylocale; 
     15    QString langCode = mylocale.name(); 
     16    if ( ! QFile::exists( PREFIX + "/share/pcbsd/i18n/pc-syskeyboard_" + langCode + ".qm" ) ) 
     17                  langCode.truncate(langCode.indexOf("_")); 
     18    translator.load( QString("pc-syskeyboard_") + langCode, PREFIX + "/share/pcbsd/i18n/" ); 
     19    a.installTranslator( &translator ); 
     20 
    721    MainWindow w; 
    822    w.show(); 
    923     
     24    QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance()) ); 
     25 
    1026    return a.exec(); 
    1127} 
  • src-qt4/pc-syskeyboard/mainwindow.cpp

    r47491b4 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#include "mainwindow.h" 
    226#include "ui_mainwindow.h" 
     
    134158    QProcess::execute(QString("setxkbmap ") + ks.xkbString()); 
    135159} 
     160 
     161/////////////////////////////////////////////////////////////////////////////// 
     162void MainWindow::slotSingleInstance() 
     163{ 
     164    this->hide(); 
     165    this->showNormal(); 
     166    this->activateWindow(); 
     167    this->raise(); 
     168} 
  • src-qt4/pc-syskeyboard/mainwindow.h

    r47491b4 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#ifndef MAINWINDOW_H 
    226#define MAINWINDOW_H 
     
    2751    void on_saveUserBtn_clicked(); 
    2852 
     53public slots: 
     54    void slotSingleInstance(); 
     55 
    2956private: 
    3057    Ui::MainWindow *ui; 
  • src-qt4/pc-syskeyboard/mainwindow.ui

    r47491b4 r2838e4d  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>447</width> 
    10     <height>301</height> 
     9    <width>445</width> 
     10    <height>299</height> 
    1111   </rect> 
    1212  </property> 
    1313  <property name="windowTitle"> 
    1414   <string>PC-BSD keyboard settings</string> 
     15  </property> 
     16  <property name="windowIcon"> 
     17   <iconset theme="input-keyboard"/> 
    1518  </property> 
    1619  <widget class="QWidget" name="centralWidget"> 
     
    183186     <x>0</x> 
    184187     <y>0</y> 
    185      <width>447</width> 
     188     <width>445</width> 
    186189     <height>21</height> 
    187190    </rect> 
  • src-qt4/pc-syskeyboard/pc-syskeyboard.pro

    r1d770c6 r2838e4d  
    3939RESOURCES += \ 
    4040    syskeyboard.qrc 
     41 
     42TRANSLATIONS =  i18n/pc-syskeyboard_af.ts \ 
     43                i18n/pc-syskeyboard_ar.ts \ 
     44                i18n/pc-syskeyboard_az.ts \ 
     45                i18n/pc-syskeyboard_bg.ts \ 
     46                i18n/pc-syskeyboard_bn.ts \ 
     47                i18n/pc-syskeyboard_bs.ts \ 
     48                i18n/pc-syskeyboard_ca.ts \ 
     49                i18n/pc-syskeyboard_cs.ts \ 
     50                i18n/pc-syskeyboard_cy.ts \ 
     51                i18n/pc-syskeyboard_da.ts \ 
     52                i18n/pc-syskeyboard_de.ts \ 
     53                i18n/pc-syskeyboard_el.ts \ 
     54                i18n/pc-syskeyboard_en_GB.ts \ 
     55                i18n/pc-syskeyboard_en_ZA.ts \ 
     56                i18n/pc-syskeyboard_es.ts \ 
     57                i18n/pc-syskeyboard_et.ts \ 
     58                i18n/pc-syskeyboard_eu.ts \ 
     59                i18n/pc-syskeyboard_fa.ts \ 
     60                i18n/pc-syskeyboard_fi.ts \ 
     61                i18n/pc-syskeyboard_fr.ts \ 
     62                i18n/pc-syskeyboard_fr_CA.ts \ 
     63                i18n/pc-syskeyboard_fur.ts \ 
     64                i18n/pc-syskeyboard_gl.ts \ 
     65                i18n/pc-syskeyboard_he.ts \ 
     66                i18n/pc-syskeyboard_hi.ts \ 
     67                i18n/pc-syskeyboard_hr.ts \ 
     68                i18n/pc-syskeyboard_hu.ts \ 
     69                i18n/pc-syskeyboard_id.ts \ 
     70                i18n/pc-syskeyboard_is.ts \ 
     71                i18n/pc-syskeyboard_it.ts \ 
     72                i18n/pc-syskeyboard_ja.ts \ 
     73                i18n/pc-syskeyboard_ka.ts \ 
     74                i18n/pc-syskeyboard_ko.ts \ 
     75                i18n/pc-syskeyboard_lt.ts \ 
     76                i18n/pc-syskeyboard_lv.ts \ 
     77                i18n/pc-syskeyboard_mk.ts \ 
     78                i18n/pc-syskeyboard_mn.ts \ 
     79                i18n/pc-syskeyboard_ms.ts \ 
     80                i18n/pc-syskeyboard_mt.ts \ 
     81                i18n/pc-syskeyboard_nb.ts \ 
     82                i18n/pc-syskeyboard_ne.ts \ 
     83                i18n/pc-syskeyboard_nl.ts \ 
     84                i18n/pc-syskeyboard_pa.ts \ 
     85                i18n/pc-syskeyboard_pl.ts \ 
     86                i18n/pc-syskeyboard_pt.ts \ 
     87                i18n/pc-syskeyboard_pt_BR.ts \ 
     88                i18n/pc-syskeyboard_ro.ts \ 
     89                i18n/pc-syskeyboard_ru.ts \ 
     90                i18n/pc-syskeyboard_sa.ts \ 
     91                i18n/pc-syskeyboard_sk.ts \ 
     92                i18n/pc-syskeyboard_sl.ts \ 
     93                i18n/pc-syskeyboard_sr.ts \ 
     94                i18n/pc-syskeyboard_sv.ts \ 
     95                i18n/pc-syskeyboard_sw.ts \ 
     96                i18n/pc-syskeyboard_ta.ts \ 
     97                i18n/pc-syskeyboard_tg.ts \ 
     98                i18n/pc-syskeyboard_th.ts \ 
     99                i18n/pc-syskeyboard_tr.ts \ 
     100                i18n/pc-syskeyboard_uk.ts \ 
     101                i18n/pc-syskeyboard_ur.ts \ 
     102                i18n/pc-syskeyboard_uz.ts \ 
     103                i18n/pc-syskeyboard_vi.ts \ 
     104                i18n/pc-syskeyboard_zh_CN.ts \ 
     105                i18n/pc-syskeyboard_zh_HK.ts \ 
     106                i18n/pc-syskeyboard_zh_TW.ts \ 
     107                i18n/pc-syskeyboard_zu.ts 
     108 
     109dotrans.path=/usr/local/share/pcbsd/i18n/ 
     110dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/pcbsd/i18n/ 
     111 
     112desktop.path=/usr/local/share/applications/ 
     113desktop.files=pcsyskeyboard.desktop 
     114 
     115 
     116INSTALLS += target desktop #dotrans 
  • src-qt4/pc-syskeyboard/widgets/kblayoutsetupwidget.cpp

    r7f323fe r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#include "kblayoutsetupwidget.h" 
    226#include "ui_kblayoutsetupwidget.h" 
  • src-qt4/pc-syskeyboard/widgets/kblayoutsetupwidget.h

    rbcd9dd1 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#ifndef KBLAYOUTSETUPWIDGET_H 
    226#define KBLAYOUTSETUPWIDGET_H 
     
    1943    explicit KbLayoutSetupWidget(QWidget *parent = 0); 
    2044    ~KbLayoutSetupWidget(); 
     45 
     46    //! Set user selected layouts to the keyboard settings 
    2147    void mergeSettings(pcbsd::keyboard::KeyboardSettings& ks); 
    2248     
  • src-qt4/pc-syskeyboard/widgets/kboptionswidget.cpp

    r3d9f9d4 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#include "kboptionswidget.h" 
    226#include "ui_kboptionswidget.h" 
     
    1034Q_DECLARE_METATYPE(Option); 
    1135 
     36/////////////////////////////////////////////////////////////////////////////// 
    1237KbOptionsWidget::KbOptionsWidget(QWidget *parent) : 
    1338    QWidget(parent), 
     
    1843} 
    1944 
     45/////////////////////////////////////////////////////////////////////////////// 
    2046void KbOptionsWidget::setSettings(KeyboardSettings ks) 
    2147{ 
     
    2450} 
    2551 
     52/////////////////////////////////////////////////////////////////////////////// 
    2653void KbOptionsWidget::mergeSettings(KeyboardSettings &ks) 
    2754{ 
     
    4370} 
    4471 
     72/////////////////////////////////////////////////////////////////////////////// 
    4573KbOptionsWidget::~KbOptionsWidget() 
    4674{ 
     
    4876} 
    4977 
     78/////////////////////////////////////////////////////////////////////////////// 
    5079void KbOptionsWidget::fillTree(KeyboardSettings ks) 
    5180{     
  • src-qt4/pc-syskeyboard/widgets/kboptionswidget.h

    rd5332c5 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#ifndef KBOPTIONSWIDGET_H 
    226#define KBOPTIONSWIDGET_H 
     
    1741    explicit KbOptionsWidget(QWidget *parent = 0); 
    1842 
     43    //! Set keyboard settings to display 
    1944    void setSettings(pcbsd::keyboard::KeyboardSettings ks); 
     45    //! Set user selected options to the keyboard settings 
    2046    void mergeSettings(pcbsd::keyboard::KeyboardSettings& ks); 
    2147 
  • src-qt4/pc-syskeyboard/widgets/kbsimpleoptionswidget.cpp

    rd5332c5 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#include "kbsimpleoptionswidget.h" 
    226#include "ui_kbsimpleoptionswidget.h" 
     
    428using namespace pcbsd::keyboard; 
    529 
     30/////////////////////////////////////////////////////////////////////////////// 
    631KbSimpleOptionsWidget::KbSimpleOptionsWidget(QWidget *parent) : 
    732    QWidget(parent), 
     
    1237} 
    1338 
     39/////////////////////////////////////////////////////////////////////////////// 
    1440KbSimpleOptionsWidget::~KbSimpleOptionsWidget() 
    1541{ 
     
    1743} 
    1844 
     45/////////////////////////////////////////////////////////////////////////////// 
    1946void KbSimpleOptionsWidget::setSettings(KeyboardSettings ks) 
    2047{ 
     
    2249} 
    2350 
     51/////////////////////////////////////////////////////////////////////////////// 
    2452void KbSimpleOptionsWidget::mergeSettings(KeyboardSettings &ks) 
    2553{ 
     
    4876} 
    4977 
     78/////////////////////////////////////////////////////////////////////////////// 
    5079void KbSimpleOptionsWidget::setupUI(KeyboardSettings ks) 
    5180{     
  • src-qt4/pc-syskeyboard/widgets/kbsimpleoptionswidget.h

    rd5332c5 r2838e4d  
     1/************************************************************************** 
     2*   Copyright (C) 2014 by Yuri Momotyuk                                   * 
     3*   yurkis@pcbsd.org                                                      * 
     4*                                                                         * 
     5*   Permission is hereby granted, free of charge, to any person obtaining * 
     6*   a copy of this software and associated documentation files (the       * 
     7*   "Software"), to deal in the Software without restriction, including   * 
     8*   without limitation the rights to use, copy, modify, merge, publish,   * 
     9*   distribute, sublicense, and/or sell copies of the Software, and to    * 
     10*   permit persons to whom the Software is furnished to do so, subject to * 
     11*   the following conditions:                                             * 
     12*                                                                         * 
     13*   The above copyright notice and this permission notice shall be        * 
     14*   included in all copies or substantial portions of the Software.       * 
     15*                                                                         * 
     16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       * 
     17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    * 
     18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* 
     19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     * 
     20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * 
     21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * 
     22*   OTHER DEALINGS IN THE SOFTWARE.                                       * 
     23***************************************************************************/ 
     24 
    125#ifndef KBSIMPLEOPTIONSWIDGET_H 
    226#define KBSIMPLEOPTIONSWIDGET_H 
     
    1842    ~KbSimpleOptionsWidget(); 
    1943 
     44    //! Set keyboard settings to display 
    2045    void setSettings(pcbsd::keyboard::KeyboardSettings ks); 
    2146 
     47    //! Set user selected options to the keyboard settings 
    2248    void mergeSettings(pcbsd::keyboard::KeyboardSettings& ks); 
    2349     
Note: See TracChangeset for help on using the changeset viewer.