Пример #1
0
FRDialog::FRDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::FRDialog)
{
    ui->setupUi(this);

    ui->tableFiles->setSelectionBehavior(QAbstractItemView::SelectRows);  //settings for table
    ui->tableFiles->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
    ui->tableFiles->verticalHeader()->hide();
    ui->tableFiles->setShowGrid(false);

    ui->LEFind->setText("");
    ui->LEReplace->setText("");
    ui->tableFiles->clearContents();

    connect(ui->pBFind, SIGNAL(clicked()), this, SLOT(find()));
    connect(ui->pBReplace, SIGNAL(clicked()), this, SLOT(replace()));
    connect(ui->cBBook, SIGNAL(activated(QString)), this, SLOT(updateinfo()));

    //    stringforfoldername = "";
    //    ui->LEFind->setText("<"); // закоментить
    updateCBChapter(Config::configuration()->PrjDir());
//    qDebug() << "path = " << Config::configuration()->PrjDir()
//             << " curpj = " << Config::configuration()->CurPrjDir();
    updateCBBook();

}
Пример #2
0
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{  
 // m_textEdit = new QTextEdit(this);
  QTextCodec::setCodecForTr(QTextCodec::codecForName("GB18030"));
  this->setWindowTitle(tr("Magic LInux 服务管理器"));
  this->setWindowIcon(QIcon("/opt/kde4/share/icons/oxygen/48x48/places/repository.png"));
   view=new TreeView(this);
   resize(800,600);
   view->setGeometry(QRect(0,0,800,600));
   //view->setGeometry(QRect(0,0,QApplication::desktop()->width(), QApplication::desktop()->height()));
   view->setContextMenuPolicy(Qt::CustomContextMenu);
      connect(view,SIGNAL(customContextMenuRequested(const QPoint &)),this,SLOT(showMenu(const QPoint &)));
   QTimer::singleShot(1000,this,SLOT(updateinfo()));

 }
Пример #3
0
void MainWindow::updateit()
{
 QTimer::singleShot(1000,this,SLOT(updateinfo()));
}