0.5.0_beta

git-svn-id: svn://db.shs.com.ru/pip@42 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2015-03-26 06:27:42 +00:00
parent 4d2b3370b1
commit d789623b9f
9 changed files with 19 additions and 7 deletions

2
.gitignore vendored
View File

@@ -1,2 +0,0 @@
doc

View File

@@ -26,5 +26,6 @@
#include "pistatemachine.h"
#include "pitime.h"
#include "pivariant.h"
#include "picli.h"
#endif // PICOREMODULE_H

View File

@@ -161,6 +161,7 @@ bool PIEthernet::init() {
}
if (params[PIEthernet::ReuseAddress]) ethSetsockoptBool(sock, SOL_SOCKET, SO_REUSEADDR);
if (params[PIEthernet::Broadcast]) ethSetsockoptBool(sock, SOL_SOCKET, SO_BROADCAST);
if (type() == PIEthernet::TCP_Client) ethSetsockoptBool(sock, SOL_SOCKET, SO_KEEPALIVE);
applyTimeouts();
applyOptInt(IPPROTO_IP, IP_TTL, TTL());
//cout << "inited " << sock << ": bc = " << params << endl;

View File

@@ -5,6 +5,6 @@
#define PIP_VERSION_MAJOR 0
#define PIP_VERSION_MINOR 5
#define PIP_VERSION_REVISION 0
#define PIP_VERSION_SUFFIX "_alpha"
#define PIP_VERSION_SUFFIX "_beta"
#endif // PIVERSION_H

View File

@@ -35,10 +35,14 @@ Daemon::Daemon(): PIPeer("_pisd_" + PISystemInfo::instance()->hostname + "_" + P
tile_info = new TileSimple("daemon info");
tile_info->hide();
tile_fm = fm.tile();
tile_fm->hide();
tile_root->addTile(tile_header);
tile_root->addTile(list_daemons);
tile_root->addTile(list_actions);
tile_root->addTile(tile_info);
tile_root->addTile(tile_fm);
CONNECTU(&screen, tileEvent, this, tileEvent)
@@ -105,6 +109,7 @@ void Daemon::tileEvent(PIScreenTile * t, TileEvent e) {
if (e.type == TileList::RowPressed) {
switch (e.data.toInt()) {
case 0: mode = 2; showTile(tile_info, "Information"); break;
case 1: mode = 3; showTile(tile_fm, "File manager"); break;
default: break;
}
}

View File

@@ -4,6 +4,7 @@
#include "piscreentiles.h"
#include "pipeer.h"
#include "pisystemmonitor.h"
#include "file_manager.h"
extern PISystemMonitor sys_mon;
@@ -80,8 +81,9 @@ private:
PIMap<int, PIString> dnames;
PISystemMonitor sys_mon_other;
HostInfo info_my, info_other;
FileManager fm;
PIScreenTile * tile_root;
TileSimple * tile_info, * tile_header;
TileSimple * tile_info, * tile_fm, * tile_header;
TileList * list_daemons, * list_actions;
int mode, offset, cur, height;

View File

@@ -1,5 +1,6 @@
#include "file_manager.h"
#include "shared.h"
#include "daemon.h"
extern PIScreen screen;
@@ -130,9 +131,10 @@ void FileManager::TileDir::resizeEvent(int w, int h) {
FileManager::FileManager() {
FileManager::FileManager(Daemon * d) {
setName("FileManager");
del_commit = false;
daemon = d;
CONNECTU(&screen, keyPressed, this, keyEvent)
//dir.setDir("/home/peri4/Documents");
TileSimple * tl;

View File

@@ -4,10 +4,12 @@
#include "piscreentiles.h"
#include "pidir.h"
class Daemon;
class FileManager: public PIObject {
PIOBJECT(FileManager)
public:
FileManager();
FileManager(Daemon * d);
PIScreenTile * tile() const;
@@ -35,6 +37,7 @@ private:
bool del_commit;
TileDir * panels[2];
Daemon * daemon;
PIScreenTile * tile_root;
PIStringList selected;
typedef PIPair<PIString, PIString> SSPair;

View File

@@ -32,8 +32,8 @@ _Init _pisd_init;
PIScreen screen(false);
PISystemMonitor sys_mon;
FileManager file_manager;
Daemon daemon_;
FileManager file_manager(&daemon_);
class MainMenu: public PITimer {