The Easiest Way to Save and Share Code Snippets on the web

mainwindow.cpp

cpp-qt

posted: Nov, 30th 2011 | jump to bottom

  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3. #include "windows.h"
  4. #include "QMessageBox"
  5.  
  6. MainWindow::MainWindow(QWidget *parent) :
  7. QMainWindow(parent),
  8. ui(new Ui::MainWindow)
  9. {
  10. ui->setupUi(this);
  11. this->setAttribute(Qt::WA_TranslucentBackground);
  12. this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
  13. }
  14.  
  15. MainWindow::~MainWindow()
  16. {
  17. delete ui;
  18. }
  19.  
  20. void MainWindow::on_pushButton_4_clicked()
  21. {
  22. qApp->quit();
  23. }
  24.  
  25. void MainWindow::on_pushButton_clicked()
  26. {
  27. system("reg add \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\" /v dontdisplaylastusername /t REG_DWORD /d 1 /f");
  28. QMessageBox::information(this,"Succes","Operation reussite");
  29. }
  30.  
  31. void MainWindow::on_pushButton_3_clicked()
  32. {
  33. system("reg add \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\" /v dontdisplaylastusername /t REG_DWORD /d 0 /f");
  34. QMessageBox::information(this,"Succes","Operation reussite");
  35. }
  36.  
  37. void MainWindow::on_pushButton_2_clicked()
  38. {
  39. QMessageBox::information(this, tr("Sur le programme"), "<center><img src=\":/new/prefix1/forum233.png\"></center><b><center>Ce programme est coder par abdoules3<br></br><br></br>Dans le but d'aider le forum94<br></br><br></br>Pour entrer dans la session son taper le username<br></br><br></br><a href=\"http://www.startimes.com/f.aspx?mode=f&f=94\"><img src=\":/new/prefix1/336013217.png\"></a></center></b>");
  40. }
  41.  
126 views