|
|
@ -161,7 +161,7 @@ int EditorHighlighter::highlightParagraph ( const TQString & text, int ) |
|
|
|
{ |
|
|
|
if( !editor->isSyntaxHighlightEnabled() ) |
|
|
|
{ |
|
|
|
setFormat( 0, text.length(), editor->tqcolorGroup().text() ); |
|
|
|
setFormat( 0, text.length(), editor->colorGroup().text() ); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
@ -224,7 +224,7 @@ Editor::Editor( TQWidget* parent, const char* name ): |
|
|
|
d->autoCalcTimer = new TQTimer( this ); |
|
|
|
d->matchingTimer = new TQTimer( this ); |
|
|
|
|
|
|
|
tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); |
|
|
|
setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); |
|
|
|
setWordWrap( NoWrap ); |
|
|
|
setHScrollBarMode( AlwaysOff ); |
|
|
|
setVScrollBarMode( AlwaysOff ); |
|
|
@ -261,7 +261,7 @@ Editor::~Editor() |
|
|
|
delete d; |
|
|
|
} |
|
|
|
|
|
|
|
TQSize Editor::tqsizeHint() const |
|
|
|
TQSize Editor::sizeHint() const |
|
|
|
{ |
|
|
|
constPolish(); |
|
|
|
TQFontMetrics fm = fontMetrics(); |
|
|
@ -503,7 +503,7 @@ void Editor::triggerAutoComplete() |
|
|
|
TQStringList choices; |
|
|
|
|
|
|
|
for( unsigned i=0; i<fnames.count(); i++ ) |
|
|
|
if( fnames[i].tqstartsWith( id, false ) ) |
|
|
|
if( fnames[i].startsWith( id, false ) ) |
|
|
|
{ |
|
|
|
TQString str = fnames[i]; |
|
|
|
|
|
|
@ -521,7 +521,7 @@ void Editor::triggerAutoComplete() |
|
|
|
TQStringList values = ValueManager::instance()->valueNames(); |
|
|
|
|
|
|
|
for(TQStringList::ConstIterator it = values.begin(); it != values.end(); ++it) |
|
|
|
if( (*it).tqstartsWith( id, false ) ) |
|
|
|
if( (*it).startsWith( id, false ) ) |
|
|
|
{ |
|
|
|
TQString choice = ValueManager::description(*it); |
|
|
|
if(choice.isEmpty()) |
|
|
@ -758,11 +758,11 @@ EditorCompletion::EditorCompletion( Editor* editor ): TQObject( editor ) |
|
|
|
d = new Private; |
|
|
|
d->editor = editor; |
|
|
|
|
|
|
|
d->completionPopup = new TQVBox( editor->tqtopLevelWidget(), 0, WType_Popup ); |
|
|
|
d->completionPopup = new TQVBox( editor->topLevelWidget(), 0, WType_Popup ); |
|
|
|
d->completionPopup->setFrameStyle( TQFrame::Box | TQFrame::Plain ); |
|
|
|
d->completionPopup->setLineWidth( 1 ); |
|
|
|
d->completionPopup->installEventFilter( this ); |
|
|
|
d->completionPopup->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum); |
|
|
|
d->completionPopup->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum); |
|
|
|
|
|
|
|
d->completionListBox = new TQListBox( d->completionPopup ); |
|
|
|
d->completionPopup->setFocusProxy( d->completionListBox ); |
|
|
@ -843,7 +843,7 @@ void EditorCompletion::showCompletion( const TQStringList &choices ) |
|
|
|
|
|
|
|
// size of the pop-up
|
|
|
|
d->completionPopup->setMaximumHeight( 120 ); |
|
|
|
d->completionPopup->resize( d->completionListBox->tqsizeHint() + |
|
|
|
d->completionPopup->resize( d->completionListBox->sizeHint() + |
|
|
|
TQSize( d->completionListBox->verticalScrollBar()->width() + 4, |
|
|
|
d->completionListBox->horizontalScrollBar()->height() + 4 ) ); |
|
|
|
|
|
|
|