Changeset 91 for trunk/orca
- Timestamp:
- 03/14/06 22:00:21 (3 years ago)
- Location:
- trunk/orca/qt
- Files:
-
- 1 added
- 1 modified
-
demos/widgets.r (added)
-
qorca.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/orca/qt/qorca.cpp
r90 r91 533 533 534 534 if( match->integer == LD_TEXT_EDITS ) 535 pw->setPlainText( valueStr( cbp.values + 1 ) ); 535 { 536 const char* str = valueStr( cbp.values + 1 ); 537 if( *str == '<' ) 538 pw->setHtml( str ); 539 else 540 pw->setPlainText( str ); 541 } 536 542 } 537 543 break; … … 1136 1142 else 1137 1143 QMessageBox::information( 0, cp1, cp2 ); 1144 } 1145 1146 1147 OR_NATIVE( questionNative ) 1148 { 1149 #define REF_QUESTION_DEF a1+4 1150 #define REF_QUESTION_BTN a1+5 1151 OString* ostr; 1152 QString str[4]; 1153 int def = 0; 1154 int i; 1155 1156 for( i = 0; i < 4; ++i ) 1157 { 1158 OValue* val = a1 + i; 1159 ostr = orSTRING(val); 1160 orTermCStr(ostr); 1161 str[i] = orStrChars(ostr, val); 1162 } 1163 1164 if( orRefineSet( REF_QUESTION_DEF ) ) 1165 def = orInt(REF_QUESTION_BTN) - 1; 1166 1167 i = QMessageBox::question( 0, str[0], str[1], str[2], str[3], 1168 QString(), def ); 1169 if( i < 0 ) 1170 { 1171 orResultNONE; 1172 } 1173 else 1174 { 1175 orResult( OT_INTEGER, i + 1 ); 1176 } 1138 1177 } 1139 1178 … … 1166 1205 "append-text: native [wid [integer!] val]\n" 1167 1206 "message: native [title [string!] msg [string!] /warn]\n" 1207 "question: native [\n" 1208 " title [string!] msg [string!]\n" 1209 " button1 [string!] button2 [string!]\n" 1210 " /default button [integer!]\n" 1211 "]\n" 1168 1212 "layout-rules: [\n" 1169 1213 " 0 ['hbox block!]\n" … … 1234 1278 orNative( (void*) appendTextNative, "append-text" ); 1235 1279 orNative( (void*) messageNative, "message" ); 1280 orNative( (void*) questionNative, "question" ); 1236 1281 1237 1282 {
