Subversion Repositories svn1

Rev

Rev 270 | Rev 283 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 270 Rev 280
Line 10... Line 10...
10
#include <QSpacerItem>
10
#include <QSpacerItem>
11
#include <QToolBar>
11
#include <QToolBar>
12
#include <QPrintDialog>
12
#include <QPrintDialog>
13
#include <QPrinter>
13
#include <QPrinter>
14
#include <QPrintPreviewDialog>
14
#include <QPrintPreviewDialog>
-
 
15
#include <QDesktopServices>
15
 
16
 
16
#include <QDirIterator>
17
#include <QDirIterator>
17
#include <QtDebug>
18
#include <QtDebug>
18
 
19
 
19
#include    "consts.h"
20
#include    "consts.h"
Line 46... Line 47...
46
    tb = new QToolBar ( "Actions" );
47
    tb = new QToolBar ( "Actions" );
47
    verticalLayout->addWidget(tb);
48
    verticalLayout->addWidget(tb);
48
    pb_original = tb->addAction ( QIcon(":/webkit/inspector/Images/reloadButtonGlyph.png"),"Home", this, SLOT(home()));
49
    pb_original = tb->addAction ( QIcon(":/webkit/inspector/Images/reloadButtonGlyph.png"),"Home", this, SLOT(home()));
49
    pb_back = tb->addAction ( QIcon(":/trolltech/styles/commonstyle/images/left-32.png"),"Back", this, SLOT(back()));
50
    pb_back = tb->addAction ( QIcon(":/trolltech/styles/commonstyle/images/left-32.png"),"Back", this, SLOT(back()));
50
    pb_forward = tb->addAction ( QIcon(":/trolltech/styles/commonstyle/images/right-32.png"),"Forward", this, SLOT(forward()));
51
    pb_forward = tb->addAction ( QIcon(":/trolltech/styles/commonstyle/images/right-32.png"),"Forward", this, SLOT(forward()));
-
 
52
 
-
 
53
    tb->addSeparator();
-
 
54
    pb_openExternal = tb->addAction ( QIcon(":/trolltech/styles/commonstyle/images/viewdetailed-32.png" ),"Open in External viewer", this, SLOT(openExternal()));
51
    pb_print = tb->addAction ( QIcon(":/trolltech/dialogs/qprintpreviewdialog/images/print-32.png" ),"Print", this, SLOT(print()));
55
    pb_explore = tb->addAction ( QIcon(":/trolltech/styles/commonstyle/images/standardbutton-open-32.png" ),"Open Location", this, SLOT(openLocation()));
-
 
56
 
52
    tb->addSeparator();
57
    tb->addSeparator();
-
 
58
    pb_print = tb->addAction ( QIcon(":/trolltech/dialogs/qprintpreviewdialog/images/print-32.png" ),"Print", this, SLOT(print()));
53
    pb_size = new QDoubleSpinBox();
59
    pb_size = new QDoubleSpinBox();
54
    pb_size->setSingleStep (0.05);
60
    pb_size->setSingleStep (0.05);
55
    pb_size->setValue(1.4);
61
    pb_size->setValue(1.4);
56
    pb_size->setToolTip("Printer Scaling Size");
62
    pb_size->setToolTip("Printer Scaling Size");
57
    tb->addWidget(pb_size);
63
    tb->addWidget(pb_size);
Line 130... Line 136...
130
 
136
 
131
    pb_original->setEnabled(enable);
137
    pb_original->setEnabled(enable);
132
    pb_back->setEnabled(enable);
138
    pb_back->setEnabled(enable);
133
    pb_forward->setEnabled(enable);
139
    pb_forward->setEnabled(enable);
134
    pb_print->setEnabled(enable);
140
    pb_print->setEnabled(enable);
-
 
141
    pb_explore->setEnabled(enable);
-
 
142
    pb_openExternal->setEnabled(enable);
135
 
143
 
136
    if ( enable )
144
    if ( enable )
137
    {
145
    {
138
        tabPath->setText(currentWebView->homeUrl);
146
        tabPath->setText(currentWebView->homeUrl);
139
    }
147
    }
Line 165... Line 173...
165
     {
173
     {
166
         currentWebView->home();
174
         currentWebView->home();
167
     }
175
     }
168
}
176
}
169
 
177
 
-
 
178
void QmReportWindow::openLocation(void)
-
 
179
{
-
 
180
    if ( currentWebView )
-
 
181
    {
-
 
182
        QString target = currentWebView->homeUrl;
-
 
183
        target.remove(QRegExp("/[^/]*$"));
-
 
184
        QDesktopServices::openUrl(target);
-
 
185
    }
-
 
186
}
-
 
187
 
-
 
188
void QmReportWindow::openExternal(void)
-
 
189
{
-
 
190
    if ( currentWebView )
-
 
191
    {
-
 
192
        QDesktopServices::openUrl(currentWebView->homeUrl);
-
 
193
    }
-
 
194
}
-
 
195
 
170
void QmReportWindow::print(void)
196
void QmReportWindow::print(void)
171
{
197
{
172
     if ( currentWebView )
198
     if ( currentWebView )
173
     {
199
     {
174
         // Delete printer preview if we are previewing a different page
200
         // Delete printer preview if we are previewing a different page