Subversion Repositories svn1-original

Rev

Rev 287 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 287 Rev 292
Line 77... Line 77...
77
 
77
 
78
    connect(tabWidget,SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
78
    connect(tabWidget,SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
79
    connect(tabWidget,SIGNAL(tabCloseRequested(int)), this, SLOT(deleteTab(int)));
79
    connect(tabWidget,SIGNAL(tabCloseRequested(int)), this, SLOT(deleteTab(int)));
80
 
80
 
81
    addReport(QString(filepath)+ "web/" + filebase + "_index.html", "Index");
81
    addReport(QString(filepath)+ "web/" + filebase + "_index.html", "Index");
-
 
82
    addReport(QString(filepath)+ "web/" + filebase + "_legindex.html", "Master Leg Index");
-
 
83
 
82
    //addReport(QString(filepath) + "brmr2011_l2_2.txt", "Starters Report 2");
84
    //addReport(QString(filepath) + "brmr2011_l2_2.txt", "Starters Report 2");
83
    tabWidget->setCurrentIndex(0);
85
    tabWidget->setCurrentIndex(0);
84
 
86
 
85
//    {
87
//    {
86
//        QDirIterator it(":", QDirIterator::Subdirectories);
88
//        QDirIterator it(":", QDirIterator::Subdirectories);
Line 145... Line 147...
145
    {
147
    {
146
        reportWindow->tabWidget->setTabText(tab, name);
148
        reportWindow->tabWidget->setTabText(tab, name);
147
    }
149
    }
148
}
150
}
149
 
151
 
-
 
152
void QmReportWindow::updateTabPath(void)
-
 
153
{
-
 
154
    if (reportWindow)
-
 
155
    {
-
 
156
        QString target = reportWindow->currentWebView->url().toString();
-
 
157
        target.remove(QRegExp("#.*$"));
-
 
158
        reportWindow->tabPath->setText(target);
-
 
159
    }
-
 
160
}
-
 
161
 
150
void QmReportWindow::deleteTab(int tab)
162
void QmReportWindow::deleteTab(int tab)
151
{
163
{
152
//    qDebug("Delete TAB:%d", tab);
164
//    qDebug("Delete TAB:%d", tab);
153
    tabWidget->removeTab(tab);
165
    tabWidget->removeTab(tab);
154
}
166
}
Line 166... Line 178...
166
    pb_explore->setEnabled(enable);
178
    pb_explore->setEnabled(enable);
167
    pb_openExternal->setEnabled(enable);
179
    pb_openExternal->setEnabled(enable);
168
 
180
 
169
    if ( enable )
181
    if ( enable )
170
    {
182
    {
171
        tabPath->setText(currentWebView->homeUrl);
183
        //tabPath->setText(currentWebView->homeUrl);
-
 
184
        //tabPath->setText(currentWebView->url().toString());
-
 
185
        QmReportWindow::updateTabPath();
172
    }
186
    }
173
    else
187
    else
174
    {
188
    {
175
        tabPath->setText("");
189
        tabPath->setText("");
176
    }
190
    }
Line 202... Line 216...
202
 
216
 
203
void QmReportWindow::openLocation(void)
217
void QmReportWindow::openLocation(void)
204
{
218
{
205
    if ( currentWebView )
219
    if ( currentWebView )
206
    {
220
    {
207
        QString target = currentWebView->homeUrl;
221
        QString target = tabPath->text();
208
        target.remove(QRegExp("/[^/]*$"));
222
        target.remove(QRegExp("/[^/]*$"));
209
        QDesktopServices::openUrl(target);
223
        QDesktopServices::openUrl(target);
210
    }
224
    }
211
}
225
}
212
 
226
 
213
void QmReportWindow::openExternal(void)
227
void QmReportWindow::openExternal(void)
214
{
228
{
215
    if ( currentWebView )
229
    if ( currentWebView )
216
    {
230
    {
-
 
231
        QString target = tabPath->text();
217
        QDesktopServices::openUrl(currentWebView->homeUrl);
232
        QDesktopServices::openUrl(target);
218
    }
233
    }
219
}
234
}
220
 
235
 
221
void QmReportWindow::print(void)
236
void QmReportWindow::print(void)
222
{
237
{