예제 #1
0
configTreeView::configTreeView(DomCfgItem *config,QWidget *parent):QTreeView(parent)
{
	QAbstractItemModel *data = new ananasListViewModel(config,parent);
	QItemSelectionModel *selections = new QItemSelectionModel(data);
	m_tabEditors=0;
	//QTreeView *mdtree = new QTreeView;
	setModel(data);
	setHeaderHidden(true);
	setSelectionModel(selections);
	setUniformRowHeights(true);
	header()->setStretchLastSection(false);
	viewport()->setAttribute(Qt::WA_StaticContents);
	header()->setResizeMode(QHeaderView::Stretch);
	setAttribute(Qt::WA_MacShowFocusRect, false);
	setContextMenuPolicy(Qt::CustomContextMenu);
	setWindowFlags(Qt::Widget);
connect(this,
            SIGNAL( customContextMenuRequested(const QPoint &) ),
            this,SLOT(showmenu(const QPoint &)));
connect(this,SIGNAL(doubleClicked ( const QModelIndex & )),this,SLOT(doubleClicked ( const QModelIndex & )));
	m_tabStopWidth = 4;
	m_lineNumbers = m_selectionBorder = m_autoIndent = m_cppHighlighter = true;
	crossButton = 0;
	menuBookmarks=((MainForm*)parent->parentWidget())->menuBookmarks;
	actionActiveBookmark=menuBookmarks->activeAction();
	//setCrossButton( !m_closeButtonInTabs );
//connect(actionOptions, SIGNAL(triggered()), this, SLOT(slotOptions()));
        loadINI();

}
예제 #2
0
파일: mainwindow.cpp 프로젝트: Azd325/simba
void MainWindow::navigationActionTriggered ( QAction *action ) {
    if( action == qaHome )
        view->load( QString("%1%2" ).arg( URL ).arg( loadINI ()));
    else if( action == qaBack )
        view->back ();
    else if( action == qaForward )
        view->forward ();
    else if( action == qaReload )
        view->reload ();
    else if( action == qaStop )
        view->stop ();
}
예제 #3
0
파일: mainwindow.cpp 프로젝트: Azd325/simba
MainWindow::MainWindow( QStringList list, QWidget *parent )
    : QMainWindow( parent ) {
    loadSettings ();

    setWindowTitle( tr( "%1 -- For better use of leo.org" ).arg( APP_NAME ));

    createBars();
    createSystemTray();

    // Remove the path item of the argv-list
    list.removeFirst();
    para = list.join(" ");

    view = new QWebView;
        view->load( QString( "%1%2%3" ).arg( URL ).arg( loadINI ()).arg( para ));
    setCentralWidget( view );

    connect( view, SIGNAL( loadStarted ()), this, SLOT( show ()));
    connect( view, SIGNAL( loadProgress ( int )), this, SLOT( progressLoad ( int )));
    connect( view, SIGNAL( loadFinished ( bool )), this, SLOT( finishedLoad ( bool )));

    clipboard = QApplication::clipboard ();
        connect(clipboard,SIGNAL( changed( QClipboard::Mode )), this, SLOT( clipboardChange ()));
}
예제 #4
0
파일: mainwindow.cpp 프로젝트: Azd325/simba
void MainWindow::clipboardChange() {
    view->load( QString("%1%2%3" ).arg( URL ).arg( loadINI ()).arg( qleSearch->text()));
}
예제 #5
0
파일: mainwindow.cpp 프로젝트: Azd325/simba
void MainWindow::lineSearch() {
    view->load( QString("%1%2%3" ).arg( URL ).arg( loadINI ()).arg( qleSearch->text()));
}