summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/apps/helpbrowser/helpbrowser.cpp2
-rw-r--r--core/apps/helpbrowser/pics/home.pngbin693 -> 0 bytes
2 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/helpbrowser/helpbrowser.cpp b/core/apps/helpbrowser/helpbrowser.cpp
index e20d49b..48da7c6 100644
--- a/core/apps/helpbrowser/helpbrowser.cpp
+++ b/core/apps/helpbrowser/helpbrowser.cpp
@@ -53,97 +53,97 @@
53 53
54HelpBrowser::HelpBrowser( QWidget* parent, const char *name, WFlags f ) 54HelpBrowser::HelpBrowser( QWidget* parent, const char *name, WFlags f )
55 : QMainWindow( parent, name, f ), 55 : QMainWindow( parent, name, f ),
56 selectedURL() 56 selectedURL()
57{ 57{
58 init( "index.html" ); 58 init( "index.html" );
59} 59}
60 60
61void HelpBrowser::init( const QString& _home ) 61void HelpBrowser::init( const QString& _home )
62{ 62{
63 setIcon( Resource::loadPixmap( "help_icon" ) ); 63 setIcon( Resource::loadPixmap( "help_icon" ) );
64 64
65 browser = new QTextBrowser( this ); 65 browser = new QTextBrowser( this );
66 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 66 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
67 connect( browser, SIGNAL( textChanged() ), 67 connect( browser, SIGNAL( textChanged() ),
68 this, SLOT( textChanged() ) ); 68 this, SLOT( textChanged() ) );
69 69
70 setCentralWidget( browser ); 70 setCentralWidget( browser );
71 setToolBarsMovable( FALSE ); 71 setToolBarsMovable( FALSE );
72 72
73 if ( !_home.isEmpty() ) 73 if ( !_home.isEmpty() )
74 browser->setSource( _home ); 74 browser->setSource( _home );
75 75
76 QPEToolBar* toolbar = new QPEToolBar( this ); 76 QPEToolBar* toolbar = new QPEToolBar( this );
77 toolbar->setHorizontalStretchable( TRUE ); 77 toolbar->setHorizontalStretchable( TRUE );
78 QPEMenuBar *menu = new QPEMenuBar( toolbar ); 78 QPEMenuBar *menu = new QPEMenuBar( toolbar );
79 79
80 toolbar = new QPEToolBar( this ); 80 toolbar = new QPEToolBar( this );
81 // addToolBar( toolbar, "Toolbar"); 81 // addToolBar( toolbar, "Toolbar");
82 82
83 //QPopupMenu* go = new QPopupMenu( this ); 83 //QPopupMenu* go = new QPopupMenu( this );
84 backAction = new QAction( tr( "Backward" ), Resource::loadIconSet( "back" ), QString::null, 0, this, 0 ); 84 backAction = new QAction( tr( "Backward" ), Resource::loadIconSet( "back" ), QString::null, 0, this, 0 );
85 connect( backAction, SIGNAL( activated() ), browser, SLOT( backward() ) ); 85 connect( backAction, SIGNAL( activated() ), browser, SLOT( backward() ) );
86 connect( browser, SIGNAL( backwardAvailable( bool ) ), 86 connect( browser, SIGNAL( backwardAvailable( bool ) ),
87 backAction, SLOT( setEnabled( bool ) ) ); 87 backAction, SLOT( setEnabled( bool ) ) );
88 //backAction->addTo( go ); 88 //backAction->addTo( go );
89 backAction->addTo( toolbar ); 89 backAction->addTo( toolbar );
90 backAction->setEnabled( FALSE ); 90 backAction->setEnabled( FALSE );
91 91
92 forwardAction = new QAction( tr( "Forward" ), Resource::loadIconSet( "forward" ), QString::null, 0, this, 0 ); 92 forwardAction = new QAction( tr( "Forward" ), Resource::loadIconSet( "forward" ), QString::null, 0, this, 0 );
93 connect( forwardAction, SIGNAL( activated() ), browser, SLOT( forward() ) ); 93 connect( forwardAction, SIGNAL( activated() ), browser, SLOT( forward() ) );
94 connect( browser, SIGNAL( forwardAvailable( bool ) ), 94 connect( browser, SIGNAL( forwardAvailable( bool ) ),
95 forwardAction, SLOT( setEnabled( bool ) ) ); 95 forwardAction, SLOT( setEnabled( bool ) ) );
96 //forwardAction->addTo( go ); 96 //forwardAction->addTo( go );
97 forwardAction->addTo( toolbar ); 97 forwardAction->addTo( toolbar );
98 forwardAction->setEnabled( FALSE ); 98 forwardAction->setEnabled( FALSE );
99 99
100 QAction *a = new QAction( tr( "Home" ), Resource::loadPixmap( 100 QAction *a = new QAction( tr( "Home" ), Resource::loadPixmap(
101"helpbrowser/home" ), QString::null, 0, this, 0 ); 101"home" ), QString::null, 0, this, 0 );
102 connect( a, SIGNAL( activated() ), browser, SLOT( home() ) ); 102 connect( a, SIGNAL( activated() ), browser, SLOT( home() ) );
103 //a->addTo( go ); 103 //a->addTo( go );
104 a->addTo( toolbar ); 104 a->addTo( toolbar );
105 105
106 bookm = new QPopupMenu( this ); 106 bookm = new QPopupMenu( this );
107 bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) ); 107 bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) );
108 bookm->insertItem( tr( "Remove from Bookmarks" ), this, SLOT( removeBookmark() ) ); 108 bookm->insertItem( tr( "Remove from Bookmarks" ), this, SLOT( removeBookmark() ) );
109 bookm->insertSeparator(); 109 bookm->insertSeparator();
110 connect( bookm, SIGNAL( activated( int ) ), 110 connect( bookm, SIGNAL( activated( int ) ),
111 this, SLOT( bookmChosen( int ) ) ); 111 this, SLOT( bookmChosen( int ) ) );
112 112
113 readBookmarks(); 113 readBookmarks();
114 114
115 //menu->insertItem( tr("Go"), go ); 115 //menu->insertItem( tr("Go"), go );
116 menu->insertItem( tr( "Bookmarks" ), bookm ); 116 menu->insertItem( tr( "Bookmarks" ), bookm );
117 117
118 resize( 240, 300 ); 118 resize( 240, 300 );
119 browser->setFocus(); 119 browser->setFocus();
120 120
121 connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), 121 connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)),
122 this, SLOT(appMessage(const QCString&, const QByteArray&)) ); 122 this, SLOT(appMessage(const QCString&, const QByteArray&)) );
123} 123}
124 124
125void HelpBrowser::appMessage(const QCString& msg, const QByteArray& data) 125void HelpBrowser::appMessage(const QCString& msg, const QByteArray& data)
126{ 126{
127 if ( msg == "showFile(QString)" ) { 127 if ( msg == "showFile(QString)" ) {
128 QDataStream ds(data,IO_ReadOnly); 128 QDataStream ds(data,IO_ReadOnly);
129 QString fn; 129 QString fn;
130 ds >> fn; 130 ds >> fn;
131 setDocument( fn ); 131 setDocument( fn );
132 } 132 }
133} 133}
134 134
135void HelpBrowser::setDocument( const QString &doc ) 135void HelpBrowser::setDocument( const QString &doc )
136{ 136{
137 if ( !doc.isEmpty() ) 137 if ( !doc.isEmpty() )
138 browser->setSource( doc ); 138 browser->setSource( doc );
139 raise(); 139 raise();
140} 140}
141 141
142 142
143void HelpBrowser::textChanged() 143void HelpBrowser::textChanged()
144{ 144{
145 if ( browser->documentTitle().isNull() ) 145 if ( browser->documentTitle().isNull() )
146 setCaption( tr("Help Browser") ); 146 setCaption( tr("Help Browser") );
147 else 147 else
148 setCaption( browser->documentTitle() ) ; 148 setCaption( browser->documentTitle() ) ;
149 149
diff --git a/core/apps/helpbrowser/pics/home.png b/core/apps/helpbrowser/pics/home.png
deleted file mode 100644
index e9ba024..0000000
--- a/core/apps/helpbrowser/pics/home.png
+++ b/dev/null
Binary files differ