QTfrontend/game.cpp
changeset 10850 c76ea22ea249
parent 10571 c90a1814a91b
child 10851 f25dad9c3136
equal deleted inserted replaced
10849:a772d342066a 10850:c76ea22ea249
    14  * You should have received a copy of the GNU General Public License
    14  * You should have received a copy of the GNU General Public License
    15  * along with this program; if not, write to the Free Software
    15  * along with this program; if not, write to the Free Software
    16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    17  */
    17  */
    18 
    18 
       
    19 #include <QApplication>
       
    20 #include <QClipboard>
       
    21 
    19 #include <QString>
    22 #include <QString>
    20 #include <QCheckBox>
    23 #include <QCheckBox>
    21 #include <QByteArray>
    24 #include <QByteArray>
    22 #include <QUuid>
    25 #include <QUuid>
    23 #include <QColor>
    26 #include <QColor>
   206     switch(msg.at(1))
   209     switch(msg.at(1))
   207     {
   210     {
   208         case '?':
   211         case '?':
   209         {
   212         {
   210             SendIPC("!");
   213             SendIPC("!");
       
   214             break;
       
   215         }
       
   216         case 'Y':
       
   217         {
       
   218             // copy string to clipboard
       
   219             QApplication::clipboard()->setText(QString::fromUtf8(msg.mid(2)));
       
   220             break;
       
   221         }
       
   222         case 'P':
       
   223         {
       
   224             // paste clipboard to game
       
   225             SendIPC(QString("P").toAscii() + QApplication::clipboard()->text().toUtf8().left(254).replace('\n', ' '));
   211             break;
   226             break;
   212         }
   227         }
   213         case 'C':
   228         case 'C':
   214         {
   229         {
   215             switch (gameType)
   230             switch (gameType)