author | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
commit | b6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff) | |
tree | d3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/apps/tinykate | |
parent | 0d59c780513da78033f4d9040475dee9db0256d4 (diff) | |
download | opie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2 |
applied the patch generated by the optimize_connect script from
TT.
4 files changed, 8 insertions, 8 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katedialogs.cpp b/noncore/apps/tinykate/libkate/document/katedialogs.cpp index 2f0ed7b..f4edd7e 100644 --- a/noncore/apps/tinykate/libkate/document/katedialogs.cpp +++ b/noncore/apps/tinykate/libkate/document/katedialogs.cpp | |||
@@ -46,33 +46,33 @@ | |||
46 | StyleChanger::StyleChanger( QWidget *parent ) | 46 | StyleChanger::StyleChanger( QWidget *parent ) |
47 | : QWidget(parent) | 47 | : QWidget(parent) |
48 | { | 48 | { |
49 | QLabel *label; | 49 | QLabel *label; |
50 | 50 | ||
51 | QGridLayout *glay = new QGridLayout( this, 4, 3, 0, KDialog::spacingHint() ); | 51 | QGridLayout *glay = new QGridLayout( this, 4, 3, 0, KDialog::spacingHint() ); |
52 | CHECK_PTR(glay); | 52 | CHECK_PTR(glay); |
53 | glay->addColSpacing( 1, KDialog::spacingHint() ); // Looks better | 53 | glay->addColSpacing( 1, KDialog::spacingHint() ); // Looks better |
54 | glay->setColStretch( 2, 10 ); | 54 | glay->setColStretch( 2, 10 ); |
55 | 55 | ||
56 | col = new KColorButton(this); | 56 | col = new KColorButton(this); |
57 | CHECK_PTR(col); | 57 | CHECK_PTR(col); |
58 | connect(col,SIGNAL(changed(const QColor &)),this,SLOT(changed())); | 58 | connect(col,SIGNAL(changed(const QColor&)),this,SLOT(changed())); |
59 | label = new QLabel(col,i18n("Normal:"),this); | 59 | label = new QLabel(col,i18n("Normal:"),this); |
60 | CHECK_PTR(label); | 60 | CHECK_PTR(label); |
61 | glay->addWidget(label,0,0); | 61 | glay->addWidget(label,0,0); |
62 | glay->addWidget(col,1,0); | 62 | glay->addWidget(col,1,0); |
63 | 63 | ||
64 | selCol = new KColorButton(this); | 64 | selCol = new KColorButton(this); |
65 | CHECK_PTR(selCol); | 65 | CHECK_PTR(selCol); |
66 | connect(selCol,SIGNAL(changed(const QColor &)),this,SLOT(changed())); | 66 | connect(selCol,SIGNAL(changed(const QColor&)),this,SLOT(changed())); |
67 | label = new QLabel(selCol,i18n("Selected:"),this); | 67 | label = new QLabel(selCol,i18n("Selected:"),this); |
68 | CHECK_PTR(label); | 68 | CHECK_PTR(label); |
69 | glay->addWidget(label,2,0); | 69 | glay->addWidget(label,2,0); |
70 | glay->addWidget(selCol,3,0); | 70 | glay->addWidget(selCol,3,0); |
71 | 71 | ||
72 | bold = new QCheckBox(i18n("Bold"),this); | 72 | bold = new QCheckBox(i18n("Bold"),this); |
73 | CHECK_PTR(bold); | 73 | CHECK_PTR(bold); |
74 | connect(bold,SIGNAL(clicked()),SLOT(changed())); | 74 | connect(bold,SIGNAL(clicked()),SLOT(changed())); |
75 | glay->addWidget(bold,1,2); | 75 | glay->addWidget(bold,1,2); |
76 | 76 | ||
77 | italic = new QCheckBox(i18n("Italic"),this); | 77 | italic = new QCheckBox(i18n("Italic"),this); |
78 | CHECK_PTR(italic); | 78 | CHECK_PTR(italic); |
@@ -277,25 +277,25 @@ HlEditDialog::HlEditDialog(HlManager *,QWidget *parent, const char *name, bool m | |||
277 | QPushButton *addContext=new QPushButton(i18n("New Context"),bbox); | 277 | QPushButton *addContext=new QPushButton(i18n("New Context"),bbox); |
278 | QPushButton *addItem=new QPushButton(i18n("New Item"),bbox); | 278 | QPushButton *addItem=new QPushButton(i18n("New Item"),bbox); |
279 | QVGroupBox *opt = new QVGroupBox( i18n("Options"), wid); | 279 | QVGroupBox *opt = new QVGroupBox( i18n("Options"), wid); |
280 | stack=new QWidgetStack(opt); | 280 | stack=new QWidgetStack(opt); |
281 | initContextOptions(contextOptions=new QVBox(stack)); | 281 | initContextOptions(contextOptions=new QVBox(stack)); |
282 | stack->addWidget(contextOptions,HlEContext); | 282 | stack->addWidget(contextOptions,HlEContext); |
283 | initItemOptions(itemOptions=new QVBox(stack)); | 283 | initItemOptions(itemOptions=new QVBox(stack)); |
284 | stack->addWidget(itemOptions,HlEItem); | 284 | stack->addWidget(itemOptions,HlEItem); |
285 | stack->raiseWidget(HlEContext); | 285 | stack->raiseWidget(HlEContext); |
286 | setMainWidget(wid); | 286 | setMainWidget(wid); |
287 | if (data!=0) loadFromDocument(data); | 287 | if (data!=0) loadFromDocument(data); |
288 | else newDocument(); | 288 | else newDocument(); |
289 | connect(contextList,SIGNAL(currentChanged( QListViewItem*)),this,SLOT(currentSelectionChanged ( QListViewItem * ))); | 289 | connect(contextList,SIGNAL(currentChanged(QListViewItem*)),this,SLOT(currentSelectionChanged(QListViewItem*))); |
290 | connect(addContext,SIGNAL(clicked()),this,SLOT(contextAddNew())); | 290 | connect(addContext,SIGNAL(clicked()),this,SLOT(contextAddNew())); |
291 | connect(addItem,SIGNAL(clicked()),this,SLOT(ItemAddNew())); | 291 | connect(addItem,SIGNAL(clicked()),this,SLOT(ItemAddNew())); |
292 | } | 292 | } |
293 | 293 | ||
294 | void HlEditDialog::newDocument() | 294 | void HlEditDialog::newDocument() |
295 | { | 295 | { |
296 | KStandardDirs *dirs = KGlobal::dirs(); | 296 | KStandardDirs *dirs = KGlobal::dirs(); |
297 | QStringList list=dirs->findAllResources("data","kate/syntax/syntax.template",false,true); | 297 | QStringList list=dirs->findAllResources("data","kate/syntax/syntax.template",false,true); |
298 | for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) | 298 | for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) |
299 | { | 299 | { |
300 | HlData data("","",*it); | 300 | HlData data("","",*it); |
301 | loadFromDocument(&data); | 301 | loadFromDocument(&data); |
diff --git a/noncore/apps/tinykate/libkate/document/katedocument.cpp b/noncore/apps/tinykate/libkate/document/katedocument.cpp index f05e21a..0c742d7 100644 --- a/noncore/apps/tinykate/libkate/document/katedocument.cpp +++ b/noncore/apps/tinykate/libkate/document/katedocument.cpp | |||
@@ -159,25 +159,25 @@ KateDocument::KateDocument(bool bSingleViewMode, bool bBrowserView, | |||
159 | maxLength = -1; | 159 | maxLength = -1; |
160 | 160 | ||
161 | setFont (KGlobalSettings::generalFont()); | 161 | setFont (KGlobalSettings::generalFont()); |
162 | 162 | ||
163 | myDocID = uniqueID; | 163 | myDocID = uniqueID; |
164 | uniqueID++; | 164 | uniqueID++; |
165 | 165 | ||
166 | myDocName = QString (""); | 166 | myDocName = QString (""); |
167 | fileInfo = new QFileInfo (); | 167 | fileInfo = new QFileInfo (); |
168 | 168 | ||
169 | myCmd = new KateCmd (this); | 169 | myCmd = new KateCmd (this); |
170 | 170 | ||
171 | connect(this,SIGNAL(modifiedChanged ()),this,SLOT(slotModChanged ())); | 171 | connect(this,SIGNAL(modifiedChanged()),this,SLOT(slotModChanged())); |
172 | 172 | ||
173 | buffer = new KWBuffer; | 173 | buffer = new KWBuffer; |
174 | connect(buffer, SIGNAL(linesChanged(int)), this, SLOT(slotBufferChanged())); | 174 | connect(buffer, SIGNAL(linesChanged(int)), this, SLOT(slotBufferChanged())); |
175 | // connect(buffer, SIGNAL(textChanged()), this, SIGNAL(textChanged())); | 175 | // connect(buffer, SIGNAL(textChanged()), this, SIGNAL(textChanged())); |
176 | connect(buffer, SIGNAL(needHighlight(long,long)),this,SLOT(slotBufferHighlight(long,long))); | 176 | connect(buffer, SIGNAL(needHighlight(long,long)),this,SLOT(slotBufferHighlight(long,long))); |
177 | 177 | ||
178 | colors[0] = KGlobalSettings::baseColor(); | 178 | colors[0] = KGlobalSettings::baseColor(); |
179 | colors[1] = KGlobalSettings::highlightColor(); | 179 | colors[1] = KGlobalSettings::highlightColor(); |
180 | 180 | ||
181 | m_attribs = new Attribute[maxAttribs]; | 181 | m_attribs = new Attribute[maxAttribs]; |
182 | 182 | ||
183 | m_highlight = 0L; | 183 | m_highlight = 0L; |
diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp index a85fb87..8e68262 100644 --- a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp +++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp | |||
@@ -526,35 +526,35 @@ FontConfig::FontConfig( QWidget *parent, char *name ) | |||
526 | // sizemanagment | 526 | // sizemanagment |
527 | QGridLayout *grid = new QGridLayout( this, 1, 1 ); | 527 | QGridLayout *grid = new QGridLayout( this, 1, 1 ); |
528 | // QString familyStr = cfg. readEntry ( "FontFamily", "Helvetica" ); | 528 | // QString familyStr = cfg. readEntry ( "FontFamily", "Helvetica" ); |
529 | // QString styleStr = cfg. readEntry ( "FontStyle", "Regular" ); | 529 | // QString styleStr = cfg. readEntry ( "FontStyle", "Regular" ); |
530 | // int size = cfg. readNumEntry ( "FontSize", 10 ); | 530 | // int size = cfg. readNumEntry ( "FontSize", 10 ); |
531 | // OFontSelector *m_fontselect; | 531 | // OFontSelector *m_fontselect; |
532 | 532 | ||
533 | m_fontselect = new Opie::OFontSelector ( false, this, "FontTab" ); | 533 | m_fontselect = new Opie::OFontSelector ( false, this, "FontTab" ); |
534 | // m_fontselect-> setSelectedFont ( familyStr, styleStr, size ); | 534 | // m_fontselect-> setSelectedFont ( familyStr, styleStr, size ); |
535 | // QWhatsThis::add( m_fontselect, | 535 | // QWhatsThis::add( m_fontselect, |
536 | // tr( "Select the desired name, style and size of the default font applications will use." ) ); | 536 | // tr( "Select the desired name, style and size of the default font applications will use." ) ); |
537 | 537 | ||
538 | connect( m_fontselect, SIGNAL( fontSelected ( const QFont & )), | 538 | connect( m_fontselect, SIGNAL( fontSelected(const QFont&)), |
539 | this, SLOT( slotFontSelected( const QFont & ))); | 539 | this, SLOT( slotFontSelected(const QFont&))); |
540 | grid->addWidget( m_fontselect, 0, 0); | 540 | grid->addWidget( m_fontselect, 0, 0); |
541 | 541 | ||
542 | 542 | ||
543 | // #if 0 | 543 | // #if 0 |
544 | // m_fontchooser = new KFontChooser ( this ); | 544 | // m_fontchooser = new KFontChooser ( this ); |
545 | // m_fontchooser->enableColumn(KFontChooser::StyleList, false); | 545 | // m_fontchooser->enableColumn(KFontChooser::StyleList, false); |
546 | // grid->addWidget( m_fontchooser, 0, 0); | 546 | // grid->addWidget( m_fontchooser, 0, 0); |
547 | 547 | ||
548 | // connect (m_fontchooser, SIGNAL (fontSelected( const QFont & )), this, SLOT (slotFontSelected( const QFont & ))); | 548 | // connect (m_fontchooser, SIGNAL (fontSelected(const QFont&)), this, SLOT (slotFontSelected(const QFont&))); |
549 | // #endif | 549 | // #endif |
550 | } | 550 | } |
551 | 551 | ||
552 | FontConfig::~FontConfig() | 552 | FontConfig::~FontConfig() |
553 | { | 553 | { |
554 | } | 554 | } |
555 | 555 | ||
556 | void FontConfig::setFont ( const QFont &font ) | 556 | void FontConfig::setFont ( const QFont &font ) |
557 | { | 557 | { |
558 | //#if 0 | 558 | //#if 0 |
559 | m_fontselect->setFont (font); | 559 | m_fontselect->setFont (font); |
560 | myFont = font; | 560 | myFont = font; |
diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp index 19a0127..32c1eab 100644 --- a/noncore/apps/tinykate/tinykate.cpp +++ b/noncore/apps/tinykate/tinykate.cpp | |||
@@ -33,25 +33,25 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : | |||
33 | shutDown=false; | 33 | shutDown=false; |
34 | nextUnnamed=0; | 34 | nextUnnamed=0; |
35 | currentView=0; | 35 | currentView=0; |
36 | viewCount=0; | 36 | viewCount=0; |
37 | setCaption(tr("TinyKATE")); | 37 | setCaption(tr("TinyKATE")); |
38 | KGlobal::setAppName("TinyKATE"); | 38 | KGlobal::setAppName("TinyKATE"); |
39 | 39 | ||
40 | QMenuBar *mb = new QMenuBar( this ); | 40 | QMenuBar *mb = new QMenuBar( this ); |
41 | mb->setMargin( 0 ); | 41 | mb->setMargin( 0 ); |
42 | 42 | ||
43 | tabwidget=new OTabWidget(this); | 43 | tabwidget=new OTabWidget(this); |
44 | setCentralWidget(tabwidget); | 44 | setCentralWidget(tabwidget); |
45 | connect(tabwidget,SIGNAL(currentChanged( QWidget *)),this,SLOT(slotCurrentChanged(QWidget *))); | 45 | connect(tabwidget,SIGNAL(currentChanged(QWidget*)),this,SLOT(slotCurrentChanged(QWidget*))); |
46 | 46 | ||
47 | //FILE ACTIONS | 47 | //FILE ACTIONS |
48 | QPopupMenu *popup = new QPopupMenu( this ); | 48 | QPopupMenu *popup = new QPopupMenu( this ); |
49 | 49 | ||
50 | // Action for creating a new document | 50 | // Action for creating a new document |
51 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); | 51 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); |
52 | a->addTo( popup ); | 52 | a->addTo( popup ); |
53 | connect(a, SIGNAL(activated()), this, SLOT(slotNew())); | 53 | connect(a, SIGNAL(activated()), this, SLOT(slotNew())); |
54 | 54 | ||
55 | // Action for opening an exisiting document | 55 | // Action for opening an exisiting document |
56 | a = new QAction( tr( "Open" ),Resource::loadPixmap( "fileopen" ) , QString::null, 0, this, 0 ); | 56 | a = new QAction( tr( "Open" ),Resource::loadPixmap( "fileopen" ) , QString::null, 0, this, 0 ); |
57 | a->addTo(popup); | 57 | a->addTo(popup); |