1 /** 2 * UGENE - Integrated Bioinformatics Tools. 3 * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> 4 * http://ugene.net 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version 2 9 * of the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 * MA 02110-1301, USA. 20 */ 21 22 #ifndef _HI_GT_PLAINTEXTEDIT_H_ 23 #define _HI_GT_PLAINTEXTEDIT_H_ 24 25 #include <QPlainTextEdit> 26 27 #include "GTGlobals.h" 28 29 namespace HI { 30 31 class HI_EXPORT GTPlainTextEdit { 32 public: 33 enum PasteMethod { Shortcut, 34 Mouse }; 35 36 // fails if lineEdit is NULL, GTLineEdit::clear fails 37 // or a set text differs from a given string 38 static void setPlainText(GUITestOpStatus &os, QPlainTextEdit *plainTextEdit, const QString &text); 39 40 // fails if lineEdit is NULL, or lineEdit's text wasn't cleared 41 static void clear(GUITestOpStatus &os, QPlainTextEdit *plainTextEdit); 42 43 // fails if GTLineEdit::clear fails 44 // static void pasteClipboard(GUITestOpStatus& os, QPlainTextEdit* plainTextEdit, PasteMethod pasteMethod = Shortcut); 45 46 // fails if lineEdit is NULL or lineEdit text is not in lineEdit's rect 47 // considering lineEdit's fontMetrics and textMargins 48 // static void checkTextSize(GUITestOpStatus& os, QPlainTextEdit* plainTextEdit); 49 }; 50 51 } // namespace HI 52 53 #endif // _HI_GT_PLAINTEXTEDIT_H_ 54