2 KNode, the KDE newsreader
3 Copyright (c) 1999-2005 the KNode authors.
4 See file AUTHORS for details
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 You should have received a copy of the GNU General Public License
11 along with this program; if not, write to the Free Software Foundation,
12 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
18 #include "knsourceviewwindow.h"
19 #include "knglobals.h"
21 #include "utilities.h"
27 KNSourceViewWindow::KNSourceViewWindow( const QString
&text
)
30 setWindowFlags( Qt::Window
);
31 setAttribute( Qt::WA_DeleteOnClose
);
33 QShortcut
*shortcut
= new QShortcut( QKeySequence(Qt::Key_Escape
), this );
34 connect( shortcut
, SIGNAL(activated()), this, SLOT(close()) );
36 setAcceptRichText( false );
38 setWindowTitle(KDialog::makeStandardCaption(i18n("Article Source"), this));
40 QPalette p
= palette();
41 p
.setColor( QPalette::Text
, knGlobals
.settings()->textColor() );
42 p
.setColor( QPalette::Base
, knGlobals
.settings()->backgroundColor() );
45 setFont( knGlobals
.settings()->articleFixedFont() );
46 setWordWrapMode( QTextOption::NoWrap
);
49 KNHelper::restoreWindowSize("sourceWindow", this, QSize(500,300));
53 KNSourceViewWindow::~KNSourceViewWindow()
55 KNHelper::saveWindowSize("sourceWindow",size());
59 #include "knsourceviewwindow.moc"